Merge branch 'hotfix_v4.3.1' into develop

This commit is contained in:
凡梦星尘 2022-10-02 13:46:50 +08:00
commit 9f2b1f37f8
13 changed files with 234 additions and 61 deletions

View File

@ -1,4 +1,4 @@
[中文](README.zh.md) | [English](#)
[中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#)
<a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org">
<img align="right" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
@ -12,14 +12,14 @@
[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 Scheme
## 🎨 4 Scheme
* :heart_decoration: Muse
* :six_pointed_star: Mist
* :pisces: Pisces
* :gemini: Gemini (**default**)
## Live Preview
## 👀 Live Preview
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
| :---: | :---: | :---: | :---: | :---: | :---: |
@ -29,22 +29,44 @@
> - Preliminary: all new feature developments will be previewed as soon as possible.
> - Production: Only the features that are tested stably and meet the requirements will be officially released.
## Quick Start
## 👣 Quick Start
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC, then use `submodule` to lead into the theme, see below commands:
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC.
### 📰 Use Template
If there your first time build blog site, Recommended use template of `Github` which can easily create your site code. Click & visit this repository: [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter), then click the green button which name call `Use this template` upper right corner on the page. Just like below image:
![Use Template](https://imgs.lisenhui.cn/hugo-next/use-hugo-next-starter.png)
After do that click the green button which name call `Create repository from template`, then will create your site code automatic, and clone it on your PC environment.
### 📐 Direct Reference
If you had a blog site, then use `submodule` to lead into the theme, see below commands:
```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple
$ git init
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
### 💻 Preview on Local
```shell
$ cd hugo-next-exmaple
$ hugo server
```
Done that input adrress http://127.0.0.1:1313/ on browser will see the effect & good luck for you! :tada::tada::tada:
> **Note**
> Don't use `hugo server` command deploy your site and enable internet visit, it just used to preview when you develop on local environment. Recommended use `hugo` command build static files all site, then deploy them into Web server such as `Nginx`.
### 🔄 Upgrade Theme
Execute command as below in your site directory when the theme upgrade.
```shell
@ -52,13 +74,15 @@ $ cd hugo-next-exmaple
$ git submodule update --remote
```
## New Post
## 📝 New Post
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post:
```sh
$ hugo new posts/hello-world.md
```
> **Note**
> By defalut `hugo new` command will create new post under `content` root directory, so in here `posts` were you custom subfolder in `content` directory.
All front matter parameters's description in post as below:
@ -97,32 +121,58 @@ tags:
#url: "{{ lower .Name }}.html"
# Sticky post set-top in home page and the smaller nubmer will more forward.
#weight: 1
# Support Math Formulas render, options: mathjax, katex
#math: mathjax
# Enable chart render, such as: flow, sequence, classes etc
#mermaid: true
---
```
## Feedback
## 🎉 User's Cases
- [Hugo Docs & Demo](https://hugo-next.eu.org/)
- [凡梦星尘空间站](https://lisenhui.cn/)
- [阿哈吉](https://a.happy2008.top/)
- [研究僧](https://yuanlucas.com/)
- [Zero's Record](https://izeroo.cn/)
- [More Cases](https://hugo-next.eu.org/flinks.html)
Hope could submmit your site information in this file [flinks.yaml](https://github.com/hugo-next/hugo-next-docs/blob/develop/data/flinks.yaml) end line such as below code sytle when you use `Hugo NexT` theme, thanks.
```yaml
- name: NexT 主题
desc: 保持简单的易用性和强大的功能
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
```
## 🙋 Feedback
- Join us [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) to chat :beers:
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) submit a new bug :bug:
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) tell me your ideas :sparkles:
## Join us
## 👨‍👩‍👧‍👦 Join us
All features development progress and new request in [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9), welcome to join us and compelete it together.
## License
## 📜 License
[MIT License](LICENSE)
Copyright (c) 2022, hugo-next teams.
## Thanks
## 💖 Thanks
That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the donate, and let we follow it growth up.
List of Donors(Order by Date):
List of Donors(Order desc by Date):
| Donation time | Donors | Donation mode | Donation content | Message |
| ------- | ------ | ------ | ---- | ---- |
| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
| :-------: | ------ | ------ | ---- | ---- |
| 2022.09.30 | *軒 | wechat pay | ¥66.66 | Hope it could help more people. |
| 2022.09.30 | N*l | wechat pay | ¥20.00 | / |
| 2022.07.09 | *风 | wechat pay | ¥10.00 | / |
| 2022.05.08 | *泉 | wechat pay | ¥6.60 | Good luck with next develop. |
| 2022.02.28 | *娇 | wechat pay | ¥5.00 | / |
| 2021.12.21 | z*y | wechat pay | ¥18.88 | / |

View File

@ -1,7 +1,7 @@
[中文](#) | [English](README.md)
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md)
<a title="Hugo NexT 站点" href="https://preview.hugo-next.eu.org">
<img align="right" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
<img align="right" alt="NexT logo" width="266" src="https://imgs.lisenhui.cn/hugo-next/logo/hugo-next-primary.png">
</a>
## Hugo NexT
@ -12,14 +12,14 @@
[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 种页面模式
## 🎨 4 种页面模式
* :heart_decoration: 冥想 (Muse)
* :six_pointed_star: 迷雾 (Mist)
* :pisces: 双鱼座 (Pisces)
* :gemini: 双子座 (Gemini) (**默认**)
## 在线预览
## 👀 在线预览
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
| :---: | :---: | :---: | :---: | :---: | :---: |
@ -29,21 +29,43 @@
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
## 快速开始
## 👣 快速开始
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git``Hugo Extened` 两款软件,然后通过 `submodule` 模式引用本主题,参考如下命令:
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git``Hugo Extened` 两款软件。
### 📰 使用模板
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
![使用模板创建](https://imgs.lisenhui.cn/hugo-next/use-hugo-next-starter.png)
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
### 📐 直接引用
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple
$ git init
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
### 💻 本地预览
```shell
$ cd hugo-next-exmaple
$ hugo server
```
打开浏览器,在地址栏输入 http://127.0.0.1:1313/ 查看主题效果,祝你好运!:tada::tada::tada:
> **Note**
> 要注意下 `hugo server` 命令只是用于本地开发或写文章时预览,并非是将其直接对外网开放访问。在正式发布时,可通过 `hugo` 命令生成全站静态文件,然后部署到类似 `Nginx` 的 Web 服务器即可。
### 🔄 主题更新
后续更新主题只需要在你的站点目录中,执行如下命令:
```shell
@ -51,9 +73,10 @@ $ cd hugo-next-exmaple
$ git submodule update --remote
```
> **Note**
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
## 发表新文章
## 📝 发表新文章
主题已经配置了默认的文章模板,建议使用如下 Hugo 命令快速创建新的文章:
@ -61,6 +84,9 @@ $ git submodule update --remote
$ hugo new posts/hello-world.md
```
> **Note**
> 其中 `posts` 路径是 `content` 根目录下的子文件夹,可依据自己的文件管理形态调整。
关于文章头部那些参数作用的说明参考如下:
@ -103,10 +129,32 @@ tags:
#url: "{{ lower .Name }}.html"
# 开启文章置顶,数字越小越靠前
#weight: 1
# 开启数学公式渲染,可选值: mathjax, katex
#math: mathjax
# 开启各种图渲染,如流程图、时序图、类图等
#mermaid: true
---
```
## 使用反馈
## 🎉 用户案例
- [Hugo Docs & Demo](https://hugo-next.eu.org/)
- [凡梦星尘空间站](https://lisenhui.cn/)
- [阿哈吉](https://a.happy2008.top/)
- [研究僧](https://yuanlucas.com/)
- [Zero's Record](https://izeroo.cn/)
- [更多案例上线](https://hugo-next.eu.org/flinks.html)
如你也正在使用 `Hugo NexT` 主题,欢迎在 [flinks.yaml](https://github.com/hugo-next/hugo-next-docs/blob/develop/data/flinks.yaml) 文件底部提交贵站的名称、描述、头像、链接等信息,具体格式内容参考如下:
```yaml
- name: NexT 主题
desc: 保持简单的易用性和强大的功能
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
```
## 🙋 使用反馈
- 加入 [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) 或 [Gitter](https://gitter.im/hugo-next/community) 在线讨论 :beers:
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug:
@ -114,23 +162,27 @@ tags:
> 国内用户也可加入 QQ 群交流: 604710815
## 欢迎加入
## 👨‍👩‍👧‍👦 欢迎加入
关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。
## 许可证
## 📜 许可证
[MIT License](LICENSE)
Copyright (c) 2022 hugo-next 团队
## 致谢
## 💖 致谢
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
以下是捐助名单列表(按时间顺序):
以下是打赏名单列表(按时间倒序):
| 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 |
| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
| :-------: | ------ | ------ | ---- | ---- |
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |顺利 |

View File

@ -1 +1 @@
4.3.0
4.3.1

View File

@ -40,6 +40,12 @@ tags:
# 开启文章置顶,数字越小越靠前
# Sticky post set-top in home page and the smaller nubmer will more forward.
#weight: 1
# 开启数学公式渲染,可选值: mathjax, katex
# Support Math Formulas render, options: mathjax, katex
#math: mathjax
# 开启各种图渲染,如流程图、时序图、类图等
# Enable chart render, such as: flow, sequence, classes etc
#mermaid: true
---
{{ .Name }}

View File

@ -22,6 +22,7 @@
&:hover {
color: $sidebar-nav-hover-color;
border-bottom-color: $sidebar-highlight;
}
}
}
@ -29,6 +30,7 @@
.sidebar-toc-active .sidebar-nav-toc, .sidebar-overview-active .sidebar-nav-overview {
border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight;
font-weight: bold;
&:hover {
color: $sidebar-highlight;

View File

@ -1,26 +1,57 @@
.post-toc {
font-size: $font-size-small;
padding: 0 8px;
ul {
list-style: none;
margin: 0;
padding: 0 2px 5px 10px;
text-align: left;
counter-reset: item;
> li {
padding-left: 0;
>li {
> ul {
border-left: 1px solid;
margin-left: 6px;
li {
position: relative;
padding-left: 0;
&:before {
position: absolute;
content: ' ';
top: 0.14em;
left: -0.75em;
width: 0.68em;
height: 0.815em;
border-style: none none dashed none;
border-width: 0.05em;
}
}
}
}
a {
transition: all $transition-ease;
border: none;
&:before {
content: counters(item, ".") ". ";
counter-increment: item;
}
&:hover {
text-decoration: underline;
color: $orange;
}
}
}
@ -39,24 +70,24 @@
display: if($toc_expand_all, block, none);
}
.active > .nav-child {
.active>.nav-child {
display: block;
}
.active-current > .nav-child {
.active-current>.nav-child {
display: block;
> .nav-item {
>.nav-item {
display: block;
}
}
.active > a {
.active>a {
border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight;
}
.active-current > a {
.active-current>a {
color: $sidebar-highlight;
&:hover {

View File

@ -70,7 +70,7 @@
border-bottom: 1px solid $body-bg-color;
}
h3 {
h3, h4 {
border-bottom: 1px dotted $body-bg-color;
}
}

View File

@ -10,9 +10,13 @@ document.addEventListener('DOMContentLoaded', () => {
imguploader,
pageview,
placeholder,
sofa,
requiredmeta,
serverurl,
wordlimit
wordlimit,
reaction,
reactiontext,
reactiontitle
} = NexT.CONFIG.waline.cfg;
@ -21,10 +25,16 @@ document.addEventListener('DOMContentLoaded', () => {
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
const locale = {
placeholder: placeholder
let locale = {
placeholder : placeholder,
sofa : sofa,
reactionTitle : reactiontitle
};
reactiontext.forEach(function(value, index){
locale['reaction'+index] = value;
});
NexT.utils.loadComments(element)
.then(() => NexT.utils.getScript(waline_js, {
}))
@ -38,6 +48,7 @@ document.addEventListener('DOMContentLoaded', () => {
imageUploader : imguploader,
wordLimit : wordlimit,
requiredMeta : requiredmeta,
reaction : reaction,
serverURL : serverurl,
lang : NexT.CONFIG.lang,
dark : 'html[data-theme="dark"]'

View File

@ -36,9 +36,10 @@ NexT.utils = {
activeThemeMode: function() {
const useDark = window.matchMedia("(prefers-color-scheme: dark)");
let darkModeState = useDark.matches;
let darkModeState = NexT.CONFIG.darkmode || useDark.matches;
const localState = NexT.utils.getLocalStorage('theme');
if (localState == 'light') {
if (localState == 'light'
|| (localState == undefined && !NexT.CONFIG.darkmode)) {
darkModeState = false;
}
NexT.utils.toggleDarkMode(darkModeState);

View File

@ -1,3 +1,3 @@
# Hugo NexT theme's custom config
version: 4.3.0
version: 4.3.1

View File

@ -44,12 +44,12 @@ addthis:
waline:
js:
name: '@waline/client'
version: 2.6.3
version: 2.11.3
file: dist/waline.js
alias: waline
css:
name: '@waline/client'
version: 2.6.3
version: 2.11.3
file: dist/waline.css
alias: waline

View File

@ -61,6 +61,12 @@ markup:
noHl: false
style: monokai
tabWidth: 2
tableOfContents:
# 开始/结束标题级别1-6 (建议从2开始)
# Heading title level of start or end: 1-6
# Recommand start at 2
startLevel: 2
endLevel: 4
# 站点文章导航文件
# Site map of all articles
@ -807,12 +813,16 @@ params:
# Waline comments system
# More info seee: https://waline.js.org/
waline:
pageView: true
placeholder: "请文明发言"
pageView: '#waline-pageview-count'
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
emoji: false
imgUploader: false
wordLimit: 200
requiredMeta: ['nick', 'mail']
reaction: true
reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉']
reactionTitle: "你认为这篇文章怎么样?"
serverURL: #<your waline server url>
# Artalk 评论插件

View File

@ -47,6 +47,10 @@ url: post/table-of-content.html
因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。
### 迎来解放
1949年12月国民党云南省主席卢汉在昆明宣布起义云南正式拉开解放的序幕。1950年2月20日陈赓、宋任穷、周保中率解放军第二野战军第四兵团进入昆明24日陈赓宣布云南全境解放。
## 生活的断层
### 跌入生活底层
@ -58,3 +62,9 @@ url: post/table-of-content.html
### 岁月像一条河
2015年是褚时健和马静芬结婚60周年被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下60年的婚姻几乎就像一个前世之梦。一个甲子的相伴相随褚时健和马静芬共同经历了国家和个人的各种风浪共同面对过生死。他们两人已经不仅是夫妻更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句但说到最后她会说一句“没有我就没有他没有他也就没有我。”
## 作者致谢
这本书从2014年初夏开始采访到今天完稿历时18个月。封面上“作者”只能是我一个人的名字但也只有我自己知道这本书包含了太多人的心力和体力。我当然首先要致谢王石先生没有他就没有这本书。我自己细想下来没有王石先生一直的鞭策和鼓励也没有我写作工作的今天。从2006年我开始从事专业写作工作以来他给我创造了很多写作的机会并且不吝自己诸多人生和学习的体会和感悟一一传递予我。知遇之恩感谢非常。
最后,我当然要把最大的感谢致予褚时健先生。不仅是因为他慷慨、坦率面对我的各种提问,更重要的是,在倾听他的故事的过程里,他繁盛的人生经历,他的强大生命力,他对生活、对事业的一片赤子之心,也丰富了我对自己人生的思考。