From a061a4037c50b3256bed867a78baff14be9344f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 4 Jul 2022 09:27:41 +0800 Subject: [PATCH 1/8] :memo: Update the README content fixed some error info. --- README.md | 6 +++--- README.zh.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0219861..a395eb1 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` $ hugo new site hugo-next-exmaple $ cd hugo-next-exmaple $ git init -$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next +$ 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 $ hugo server @@ -60,7 +60,7 @@ There had ready a new post template for you, It is recommended to use the follo $ hugo new posts/hello-world.md ``` -Descript front matter in post as below: +All front matter parameters's description in post as below: ```yml @@ -114,7 +114,7 @@ All features development progress and new request in [Hugo NexT V4 Roadmap](http [MIT License](LICENSE) -Copyright (c) 2022, hugo-next 团队 +Copyright (c) 2022, hugo-next teams. ## Thanks diff --git a/README.zh.md b/README.zh.md index 325ef53..b9a0973 100644 --- a/README.zh.md +++ b/README.zh.md @@ -37,7 +37,7 @@ $ hugo new site hugo-next-exmaple $ cd hugo-next-exmaple $ git init -$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next +$ 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 $ hugo server @@ -61,7 +61,7 @@ $ git submodule update --remote $ hugo new posts/hello-world.md ``` -关于文章头部的那些标记作用的说明参考如下: +关于文章头部那些参数作用的说明参考如下: ```yml @@ -122,7 +122,7 @@ tags: [MIT License](LICENSE) -Copyright (c) 2022, hugo-next teams +Copyright (c) 2022, hugo-next 团队 ## 致谢 @@ -133,4 +133,4 @@ Copyright (c) 2022, hugo-next teams | 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 | | :-------: | ------ | ------ | ---- | ---- | | 2021.12.21 | z*y | 微信支付 | ¥18.88 | / | -| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 | \ No newline at end of file +| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |顺利 | \ No newline at end of file From 04bf52abb8258d705539363420c3a1a667a2f3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sat, 1 Oct 2022 09:37:16 +0800 Subject: [PATCH 2/8] :memo: Add some new front matter parameters in default archetype. --- archetypes/default.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/archetypes/default.md b/archetypes/default.md index 57a7d26..6aa746e 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -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 }} From dd8ffbb179fcaf7dff91ecae1cd15c36315b1525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sat, 1 Oct 2022 16:59:48 +0800 Subject: [PATCH 3/8] :wrench: Move the version to v4.3.1 --- VERSION | 2 +- data/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8089590..ecedc98 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.3.0 +4.3.1 \ No newline at end of file diff --git a/data/config.yaml b/data/config.yaml index 8e21e48..89eec50 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -1,3 +1,3 @@ # Hugo NexT theme's custom config -version: 4.3.0 \ No newline at end of file +version: 4.3.1 \ No newline at end of file From 12082134763ece2551cd25805c05c7612f57a06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sat, 1 Oct 2022 18:21:35 +0800 Subject: [PATCH 4/8] :lipstick: Upgrade the waline version to support emoji click for article. --- assets/js/third-party/comments/waline.js | 17 ++++++++++++++--- data/resources.yaml | 4 ++-- exampleSite/config.yaml | 8 ++++++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/assets/js/third-party/comments/waline.js b/assets/js/third-party/comments/waline.js index 2ac0c23..97ad00a 100644 --- a/assets/js/third-party/comments/waline.js +++ b/assets/js/third-party/comments/waline.js @@ -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"]' diff --git a/data/resources.yaml b/data/resources.yaml index e05d100..9159733 100644 --- a/data/resources.yaml +++ b/data/resources.yaml @@ -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 diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index c16e35d..76a79a3 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -807,12 +807,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: # # Artalk 评论插件 From a7b9d5338e0c48e663e9966de2385a15ef6a7bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sat, 1 Oct 2022 22:06:47 +0800 Subject: [PATCH 5/8] :lipstick: Add tree line on TOC list style. --- .../_common/outline/sidebar/sidebar-toc.scss | 53 +++++++++++++++---- assets/css/_schemes/Gemini/index.scss | 2 +- exampleSite/config.yaml | 6 +++ exampleSite/content/post/table-of-content.md | 12 ++++- 4 files changed, 60 insertions(+), 13 deletions(-) diff --git a/assets/css/_common/outline/sidebar/sidebar-toc.scss b/assets/css/_common/outline/sidebar/sidebar-toc.scss index c8e373f..29eba64 100644 --- a/assets/css/_common/outline/sidebar/sidebar-toc.scss +++ b/assets/css/_common/outline/sidebar/sidebar-toc.scss @@ -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, ".") ". "; + 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 { @@ -64,4 +95,4 @@ } } } -} +} \ No newline at end of file diff --git a/assets/css/_schemes/Gemini/index.scss b/assets/css/_schemes/Gemini/index.scss index 845e620..b3f3c9e 100644 --- a/assets/css/_schemes/Gemini/index.scss +++ b/assets/css/_schemes/Gemini/index.scss @@ -70,7 +70,7 @@ border-bottom: 1px solid $body-bg-color; } - h3 { + h3, h4 { border-bottom: 1px dotted $body-bg-color; } } diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 76a79a3..c6b9d5b 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -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 diff --git a/exampleSite/content/post/table-of-content.md b/exampleSite/content/post/table-of-content.md index ee9637d..e31b6d0 100644 --- a/exampleSite/content/post/table-of-content.md +++ b/exampleSite/content/post/table-of-content.md @@ -47,6 +47,10 @@ url: post/table-of-content.html 因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。 +### 迎来解放 + +1949年12月,国民党云南省主席卢汉在昆明宣布起义,云南正式拉开解放的序幕。1950年2月20日,陈赓、宋任穷、周保中率解放军第二野战军第四兵团进入昆明,24日,陈赓宣布云南全境解放。 + ## 生活的断层 ### 跌入生活底层 @@ -57,4 +61,10 @@ url: post/table-of-content.html ### 岁月像一条河 -2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。” \ No newline at end of file +2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。” + +## 作者致谢 + +这本书从2014年初夏开始采访,到今天完稿,历时18个月。封面上“作者”只能是我一个人的名字,但也只有我自己知道,这本书,包含了太多人的心力和体力。我当然首先要致谢王石先生,没有他就没有这本书。我自己细想下来,没有王石先生一直的鞭策和鼓励,也没有我写作工作的今天。从2006年我开始从事专业写作工作以来,他给我创造了很多写作的机会,并且不吝自己诸多人生和学习的体会和感悟,一一传递予我。知遇之恩,感谢非常。 + +最后,我当然要把最大的感谢致予褚时健先生。不仅是因为他慷慨、坦率面对我的各种提问,更重要的是,在倾听他的故事的过程里,他繁盛的人生经历,他的强大生命力,他对生活、对事业的一片赤子之心,也丰富了我对自己人生的思考。 \ No newline at end of file From d6fbf924b80670caf03f9ead7f1c64985120a1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sun, 2 Oct 2022 09:28:21 +0800 Subject: [PATCH 6/8] :lipstick: Improve the theme switch logic with config defined. --- assets/js/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/utils.js b/assets/js/utils.js index fcf0f3a..a8fe09a 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -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); From 3f8ab12e474fc63294e0bef156ef1554b9030c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sun, 2 Oct 2022 09:28:51 +0800 Subject: [PATCH 7/8] :lipstick: Add TOC header hover & active style. --- assets/css/_common/outline/sidebar/sidebar-nav.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/css/_common/outline/sidebar/sidebar-nav.scss b/assets/css/_common/outline/sidebar/sidebar-nav.scss index 1f137bb..2dd302f 100644 --- a/assets/css/_common/outline/sidebar/sidebar-nav.scss +++ b/assets/css/_common/outline/sidebar/sidebar-nav.scss @@ -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; From 4381eee782e2d8039a1675dd326716a4dd354a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sun, 2 Oct 2022 11:11:37 +0800 Subject: [PATCH 8/8] :memo: Update the README content. --- README.md | 86 ++++++++++++++++++++++++++++++++--------- README.zh.md | 90 ++++++++++++++++++++++++++++++++++--------- archetypes/default.md | 2 +- 3 files changed, 140 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index f3abf8d..6ffd465 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[中文](README.zh.md) | [English](#) +[中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#) NexT logo @@ -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. | \ No newline at end of file +| :-------: | ------ | ------ | ---- | ---- | +| 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 | / | \ No newline at end of file diff --git a/README.zh.md b/README.zh.md index 9c6336a..5ee408e 100644 --- a/README.zh.md +++ b/README.zh.md @@ -1,7 +1,7 @@ -[中文](#) | [English](README.md) +[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md) - NexT logo + NexT logo ## 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` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。 -以下是捐助名单列表(按时间顺序): +以下是打赏名单列表(按时间倒序): -| 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 | +| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 | | :-------: | ------ | ------ | ---- | ---- | -| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / | -| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |顺利 | \ No newline at end of file +| 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 | / | \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md index 6aa746e..b317672 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -43,7 +43,7 @@ tags: # 开启数学公式渲染,可选值: mathjax, katex # Support Math Formulas render, options: mathjax, katex #math: mathjax -# 开启各种图渲染,如流程图,时序图,类图等 +# 开启各种图渲染,如流程图、时序图、类图等 # Enable chart render, such as: flow, sequence, classes etc #mermaid: true ---