├── .github
└── workflows
│ └── sync-2-gitee.yml
├── .gitignore
├── .travis.yml
├── .travis
└── replace_params_value.sh
├── LICENSE
├── README.en.md
├── README.md
├── archetypes
├── about.md
└── default.md
├── exampleSite
├── .gitignore
├── LICENSE
├── README.md
├── config
│ └── _default
│ │ ├── config.toml
│ │ ├── languages.toml
│ │ ├── menu.en.toml
│ │ ├── menu.zh-CN.toml
│ │ ├── params.en.toml
│ │ ├── params.toml
│ │ └── params.zh-CN.toml
├── configTaxo.toml
└── content
│ ├── en
│ ├── _index.md
│ ├── about
│ │ └── index.md
│ └── post
│ │ ├── emoji-support.md
│ │ ├── markdown-syntax.md
│ │ ├── math-typesetting.md
│ │ ├── placeholder-text.md
│ │ └── rich-content.md
│ └── zh-CN
│ ├── _index.md
│ ├── about
│ └── index.md
│ └── post
│ ├── emoji-support.md
│ ├── markdown-syntax.md
│ ├── math-typesetting.md
│ ├── placeholder-text.md
│ └── rich-content.md
├── i18n
├── en.toml
└── zh-CN.toml
├── images
├── screenshot.png
└── tn.png
├── layouts
├── 404.html
├── _default
│ ├── _markup
│ │ └── render-link.html
│ ├── baseof.html
│ ├── list.searchindex.xml
│ ├── single.html
│ └── terms.html
├── about
│ └── single.html
├── docs
│ ├── baseof.html
│ ├── list.html
│ └── single.html
├── index.html
├── partials
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ ├── pagination.html
│ ├── post
│ │ ├── category.html
│ │ ├── date.html
│ │ ├── prenext.html
│ │ ├── readtime.html
│ │ ├── tags.html
│ │ ├── visitors.html
│ │ └── wordcount.html
│ ├── post_list.html
│ ├── post_simple_list.html
│ ├── script.html
│ ├── sidebar.html
│ ├── sidebar
│ │ ├── author.html
│ │ ├── link.html
│ │ ├── rss.html
│ │ ├── social.html
│ │ ├── state.html
│ │ ├── stats.html
│ │ ├── tagcloud.html
│ │ └── toc.html
│ ├── sub_menu.html
│ └── widgets
│ │ ├── comment.html
│ │ ├── copyright.html
│ │ ├── reward.html
│ │ ├── search.html
│ │ ├── share.html
│ │ └── statis.html
├── robots.txt
├── searchindex.xml
├── section
│ └── list.html
├── shortcodes
│ ├── bilibili.html
│ ├── note.html
│ └── qc.html
└── taxonomy
│ ├── category.html
│ └── tag.html
├── static
├── css
│ ├── main.css
│ └── syntax.css
├── img
│ ├── 404.png
│ ├── ali-pay.png
│ ├── apple-touch-icon.png
│ ├── avatar.gif
│ ├── avatar.png
│ ├── cc-by-nc-nd.svg
│ ├── cc-by-nc-sa.svg
│ ├── cc-by-nc.svg
│ ├── cc-by-nd.svg
│ ├── cc-by-sa.svg
│ ├── cc-by.svg
│ ├── cc-zero.svg
│ ├── favicon.ico
│ ├── loading.gif
│ ├── logo.png
│ ├── placeholder.gif
│ ├── qq_qrcode.png
│ ├── quote-l.svg
│ ├── quote-r.svg
│ ├── searchicon.png
│ └── wechat-pay.png
└── js
│ ├── affix.js
│ ├── scrollspy.js
│ └── search.js
└── theme.toml
/.github/workflows/sync-2-gitee.yml:
--------------------------------------------------------------------------------
1 | name: sync-2-gitee
2 |
3 | on:
4 | push:
5 | branches: [main, gh-pg]
6 |
7 | jobs:
8 | sync-2-gitee:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Sync to Gitee
12 | uses: wearerequired/git-mirror-action@master
13 | env:
14 | SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
15 | with:
16 | source-repo: git@github.com:elkan1788/hugo-theme-next.git
17 | destination-repo: git@gitee.com:lisenhui/hugo-theme-next.git
18 |
19 | reload-pages:
20 | needs: sync-2-gitee
21 | runs-on: ubuntu-latest
22 | steps:
23 | - name: Build Gitee Pages by GitAction
24 | uses: yanglbme/gitee-pages-action@main
25 | with:
26 | gitee-username: elkan1788@139.com
27 | gitee-password: ${{ secrets.GITEE_PASSWORD }}
28 | gitee-repo: lisenhui/hugo-theme-next
29 | branch: gh-pg
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | public/
2 | exampleSite/config/dev/
3 | .hugo_build.lock
4 | *.exe
5 | .DS_Store
6 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | branches:
4 | only:
5 | - main
6 |
7 | addons:
8 | ssh_known_hosts:
9 | - github.com
10 |
11 | env:
12 | - HUGO_VERSION=0.82.1
13 |
14 | before_install:
15 | - export TZ='Asia/Shanghai'
16 | - export LANG="zh_CN.UTF-8"
17 |
18 | install:
19 | - wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -nd -P soft
20 | - tar -xzvf soft/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C soft
21 | - chmod +x soft/hugo
22 | - export PATH=$PATH:$PWD/soft
23 | - hugo version
24 | - echo 'Hugo engine env is ready.'
25 |
26 | script:
27 | - cd ./exampleSite
28 | - rm -rf ../public
29 | - sh ../.travis/replace_params_value.sh
30 | - cat config/_default/params.toml
31 | - hugo -d ../public -t ../..
32 | - cp ../README.md ../public
33 | - cp ../README.en.md ../public
34 | - cp ../LICENSE ../public
35 |
36 | deploy:
37 | provider: pages
38 | skip-cleanup: true
39 | local-dir: public
40 | target-branch: gh-pg
41 | github-token: $GITHUB_PAGES
42 | keep-history: true
43 | commit_message: "Update blog site by TravisCI with build $TRAVIS_BUILD_ID"
44 | on:
45 | branch: main
46 |
47 | after_deploy:
48 | - pwd
49 | - ls -al ../public
50 | - echo "Deploy blog article success."
--------------------------------------------------------------------------------
/.travis/replace_params_value.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "Start replace the plugin's paramter"
4 |
5 | ## replace the paramter's values
6 | sed -i '
7 | s/Your AddthisPubid/'$AddthisPubid'/g
8 | s/Your BaiduSiteId/'$BaiduSiteId'/g
9 | s/Your CNNZSiteId/'$CNNZSiteId'/g
10 | s/Your DaoVoiceId/'$DaoVoiceId'/g
11 | s/Your GoogleSiteId/'$GoogleSiteId'/g
12 | s/Your LaSiteId/'$LaSiteId'/g
13 | s/Your LCAppId/'$LCAppId'/g
14 | s/Your LCAppKey/'$LCAppKey'/g
15 | s|Your LCServer|'$LCServer'|g
16 | s/Your LiveReId/'$LiveReId'/g
17 | s/Your RevolverMapId/'$RevolverMapId'/g
18 | s|Your WalineSerURL|'$WalineSerURL'|g
19 | ' config/_default/params.toml
20 |
21 | echo "Replace the plugin's paramter is success."
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 xtfly
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.en.md:
--------------------------------------------------------------------------------
1 | [](https://studygolang.com/dl#go1.12.1)
2 | [](https://github.com/gohugoio/hugo/releases/tag/v0.87.0)
3 | 
4 | [](https://travis-ci.com/elkan1788/hugo-theme-next)
5 | [](https://github.com/elkan1788/hugo-theme-next/tree/gh-pg)
6 | [](https://github.com/elkan1788/hugo-theme-next/releases)
7 | [](https://github.com/elkan1788/hugo-theme-next/releases/latest)
8 | 
9 |
10 | # Subscribe New Hugo NexT
11 |
12 | Since I used Hugo engine to migrated my blog at Augst 2022, and the `hugo-theme-next` theme was nearly 2 year old. In those times I had repaired & added some features, but found that there still more different from `Hexo NexT`. In order to more better friendly using theme travel who loved the `NexT`, I begined rebuild the theme with latest Hexo NexT V8 version when COVID-19 happened in Shanghai. Now it finished whole display content & supoort 4 shceme as origin. Welcome to your attention & join in. Thanks.
13 |
14 |
15 |
16 | New Repository: [Hugo NexT Origination](https://github.com/hugo-next/)
17 |
18 | Preview: [Hugo NexT Development](https://preview.hugo-next.eu.org/)
19 |
20 | ## This theme would never update next time!!!
21 | ## This theme would never update next time!!!
22 | ## This theme would never update next time!!!
23 |
24 |
25 | [中文](https://github.com/elkan1788/hugo-theme-next/blob/main/README.md) | [English](#)
26 |
27 | # Quick Starter
28 |
29 | Recommended to use [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) build your site, it's easily!
30 |
31 | # NexT for Hugo
32 |
33 | This theme is base on [xtfly](https://github.com/xtfly/hugo-theme-next) who port it from `Hexo` engine, then I had do more depth optimization and renovation. With the origin `NexT` theme's is simple and animated, I had add many blogs ecological related servcie components, make it more perfect and easy to use. The main features as folows:
34 |
35 | - Multiple devices display adaptive
36 | - Support Chinese and English
37 | - Support a variety of site statistics tools, such as Baidu, Google, CNZZ, Busuanzi etc
38 | - Automatically generate site map, with Baidu link push SEO optimization
39 | - Integrate multiple comment plug-ins
40 | - Add plug-ins for articles to share quickly
41 | - Support article access statistics
42 | - Integrated Picture viewer
43 | - Custom profile page
44 | - Online chat IM
45 | - ......
46 |
47 | With all the maintenance and upgrades, we want to see the 'NexT' theme continue to shine on the 'Hugo' engine.For the latest information about this theme, you can check the build status and new release above. Welcome to use and feedback.
48 |
49 | # Previw
50 |
51 | The adaptability compatible with PC and different mobile devices is as follows:
52 |
53 | 
54 |
55 | Some browsers compatible with PC tests are as follows:
56 |
57 | [](#)
58 | [](#)
59 | [](#)
60 | [](#)
61 | [](#)
62 |
63 | > You can also visit my blog space to preview the actual effect, please click on [https://lisenhui.cn](https://lisenhui.cn) to visit.
64 |
65 | # QuickStart
66 |
67 | 1. Refere to `Hugo` official deployment document [Installing] (https://gohugo.io/getting-started/installing/), and installed `Hugo` command on your computer;
68 |
69 | 2. Refer to the official Git deployment documentation [Install Git](https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git) to install the `Git` command on your computer;
70 |
71 | 3. Execute the 'Hugo new site' command to create your own site;
72 |
73 | 4. Run the 'git init' command to initialize all the files on the site;
74 |
75 | 5. Switch to the site of `themes` directory, execute `git clone - recurse - submodules https://github.com/elkan1788/hugo-theme-next.git` command to clone this theme;
76 |
77 | Recommended use `Gitee` repository in China: `git clone --recurse-submodules https://gitee.com/lisenhui/hugo-theme-next.git`
78 |
79 | 6. Copy the two directories `config` and `content` from `hugo-theme-next/exampleSite` to the root directory of the site;
80 |
81 | 7. Execute `hugo server` to generate site services;
82 |
83 | 8. Open your browser and enter `http://localhost:1313/` in the address bar to view the effect.
84 |
85 | [](https://asciinema.org/a/434226)
86 |
87 | > Later, you can refer to the configuration parameters in the file in the `config` directory to adjust as needed to generate your own personalized site.
88 |
89 | # Markdown syntax
90 |
91 | The default for this theme is to place Chinese articles in the `post` folder under `zh-CN` and English articles in the `post` folder under `en`. In addition, there is only one `index.md` file under the `about` folder for editing personal information.
92 |
93 | 1. The template reference for the beginning of the article:
94 |
95 | ```
96 | ---
97 | title: "Hello World"
98 | url: 2020/09/11/hexo-hello-world.html
99 | date: "2020-09-11"
100 | tags:
101 | - testing
102 | - learn
103 | categories:
104 | - Hugo
105 | toc: true
106 | math: true
107 | type: about
108 | ---
109 | ```
110 |
111 | Parameter description:
112 |
113 | - `title`: title of artilce
114 | - `url`: visit link of article
115 | - `date`: push date of article
116 | - `tags`: tag of article
117 | - `categories`: category of article
118 | - `toc`: to enable directory navigation
119 | - `math`: to enable mathematical formula parsing
120 | - `type`: Page display type
121 |
122 | 2. For the Summary content displayed on the home page, Manual intervention can be done by using the `` label. For more information, please refer to the official document: [Manual Summary Splitting](https://gohugo.io/content-management/summaries/#user-defined-manual-summary-splitting)。
123 |
124 | # License
125 | [MIT License](LICENSE).
126 |
127 | # Thanks
128 |
129 | That was my personal hobby to improve and perfect the theme of Hugo's `NexT`, but I didn't expect people to be so enthusiastic. Thanks all for your support, let's witness its growth together.
130 |
131 | The list of donors (in date order):
132 |
133 | | Donation time | Donors | Donation mode | Donation content | Message |
134 | | ------- | ------ | ------ | ---- | ---- |
135 | | 2021.12.21 | z*y | wechat pay | RMB 18.88 | |
136 | | 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://studygolang.com/dl#go1.12.1)
2 | [](https://github.com/gohugoio/hugo/releases/tag/v0.87.0)
3 | 
4 | [](https://travis-ci.com/elkan1788/hugo-theme-next)
5 | [](https://github.com/elkan1788/hugo-theme-next/tree/gh-pg)
6 | [](https://github.com/elkan1788/hugo-theme-next/releases)
7 | [](https://github.com/elkan1788/hugo-theme-next/releases/latest)
8 | 
9 |
10 | # 请大家移架关注 Hugo NexT
11 |
12 | `hugo-theme-next` 主题自打 2020 年 8 月时鄙人迁移博客至 Hugo 引擎起,也快要有 2 年的时间啦。在此期间也是对该主题做过些功能改动和修复,但发现与 `Hexo NexT` 的效果还是有较大的差距。 为让各位 `NexT` 粉丝们更好的使用主题,个人此次在上海疫情间,根据 `Hexo NexT` 最新的 V8 版本进行全面移植重构,现已经完成整体布局开发(支持 4 种不同风格展示),欢迎大家关注与参与。
13 |
14 |
15 |
16 | 新仓库地址: [Hugo NexT 组织](https://github.com/hugo-next/)
17 |
18 | 效果预览: [Hugo NexT 开发版](https://preview.hugo-next.eu.org/)
19 |
20 | ## 今后本主题将不再更新!!!
21 | ## 今后本主题将不再更新!!!
22 | ## 今后本主题将不再更新!!!
23 |
24 | [中文](#) | [English](https://github.com/elkan1788/hugo-theme-next/blob/main/README.en.md)
25 |
26 | # 快速模板
27 |
28 | 建议使用 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 此模板快速搭建站点,使用更简单!
29 |
30 | # Hugo版本的NexT主题
31 |
32 | 本主题是在[xtfly](https://github.com/xtfly/hugo-theme-next)移植基础上,再次进行深度的优化和改造,维持了`NexT`原本简单朴素的基调,同时增添不少与博客生态相关的服务组件,让主题更加的完善和好用。主要的特性如下:
33 |
34 | - 多种设备显示自适应
35 | - 支持中英文双语切换
36 | - 支持多种站点统计工具,如百度,谷歌,CNZZ,不蒜子
37 | - 自动生成站点地图,加入百度链接推送SEO优化
38 | - 集成多种评论插件
39 | - 添加文章快速分享
40 | - 支持文章访问统计
41 | - 集成图片浏览器
42 | - 自定义个人信息页面
43 | - 在线聊天功能
44 | - ......
45 |
46 | 耗费如此多精力去维护及升级,也是希望看到`NexT`主题能在`Hugo`引擎上继续发光发热。关于本主题的最新情况,可查看上方的构建状态和新版本发布,欢迎大家使用与反馈。
47 |
48 | # 效果预览
49 |
50 | 同时兼容PC端和不同移动设备访问的自适应,效果如下:
51 |
52 | 
53 |
54 | 其中PC端测试兼容的部分浏览器有:
55 |
56 | [](#)
57 | [](#)
58 | [](#)
59 | [](#)
60 | [](#)
61 |
62 | > 也可访问鄙人的博客空间预览实际效果,欢迎点击[https://lisenhui.cn](https://lisenhui.cn)访问。
63 |
64 | # 快速开始
65 |
66 | 1. 参考`Hugo`官方的部署文档[Installing](https://gohugo.io/getting-started/installing/),在您的电脑上安装`Hugo`执行文件;
67 |
68 | 2. 参考`Git`官方的部署文档[安装 Git](https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git),在您的电脑上安装`Git`执行文件;
69 |
70 | 3. 执行`hugo new site [站点名称]`命令来创建您自己的站点;
71 |
72 | 4. 执行`git init`命令初步化站点的所有文件;
73 |
74 | 5. 切换到站点的`themes`目录下,执行`git clone --recurse-submodules https://github.com/elkan1788/hugo-theme-next.git`命令克隆本主题
75 | > 在国内可使用`Gitee`仓库地址: `git clone --recurse-submodules https://gitee.com/lisenhui/hugo-theme-next.git`
76 |
77 | 6. 拷贝`hugo-theme-next/exampleSite`目录下的两个文件夹内容`config`和`content`到站点根目录下面;
78 |
79 | 7. 执行`hugo server`生成站点服务;
80 |
81 | 8. 打开浏览器,在地址栏输入`http://localhost:1313/`访问查看效果。
82 |
83 | [](https://asciinema.org/a/434226)
84 |
85 | > 后续可参考`config`目录下文件里的配置参数,按需调整生成您自己个性化的站点。
86 |
87 | # 文章标记
88 |
89 | 本主题默认是把中文文章放在`zh-CN`目录下的`post`文件夹,而英文文章放在`en`目录下的`post`文件夹,另外在`about`文件夹下只有一个`index.md`文件用于编辑个人信息。
90 |
91 | 1. 文章的开头模板参考:
92 |
93 | ```
94 | ---
95 | title: "Hello World"
96 | url: 2020/09/11/hexo-hello-world.html
97 | date: "2020-09-11"
98 | tags:
99 | - 测试
100 | - 学习
101 | categories:
102 | - Hugo
103 | toc: true
104 | math: true
105 | type: about
106 | ---
107 | ```
108 |
109 | 参数作用说明:
110 |
111 | - `title`: 文章标题
112 | - `url`: 访问路径
113 | - `date`: 发表日期
114 | - `tags`: 文章标签
115 | - `categories`: 文章分类
116 | - `toc`: 是否开启目录导航
117 | - `math`: 是否开启数学公式解析
118 | - `type`: 页面显示类型
119 |
120 | 2. 关于首页显示的文章摘要内容可使用 `` 标签来手动干预,更多说明可详见官方文档:[Manual Summary Splitting](https://gohugo.io/content-management/summaries/#user-defined-manual-summary-splitting)。
121 |
122 | # 许可证
123 | [MIT License](LICENSE).
124 |
125 | # 致谢
126 |
127 | 完善`Hugo NexT`主题原是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,就让我们一起来见证它的成长吧。
128 |
129 | 以下是捐助名单列表(按时间顺序):
130 |
131 | | 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 |
132 | | ------- | ------ | ------ | ---- | ---- |
133 | | 2021.12.21 | z*y | 微信支付 | ¥18.88 | |
134 | | 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
--------------------------------------------------------------------------------
/archetypes/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ replace .Name "-" " " | title }}
3 | description: "What your want tell the world."
4 | date: "{{ .Date }}"
5 | url: "about.html"
6 | toc: false
7 | type: "about"
8 | ---
--------------------------------------------------------------------------------
/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{{ .TranslationBaseName | title }}"
3 | url: "{{ dateFormat "2006/01/01" .Date }}/{{ lower (substr .TranslationBaseName 6) }}.html"
4 | date: "{{ .Date }}"
5 | draft: true
6 | categories:
7 | - "xx"
8 | tags:
9 | - "xxx"
10 | - "xxx"
11 | toc: false
12 | ---
--------------------------------------------------------------------------------
/exampleSite/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 |
25 | /public
26 | /themes
27 | .DS_Store
28 |
--------------------------------------------------------------------------------
/exampleSite/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/exampleSite/README.md:
--------------------------------------------------------------------------------
1 | # hugoBasicExample
2 |
3 | This repository offers an example site for [Hugo](https://gohugo.io/) and also it provides the default content for demos hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/).
4 |
5 | # Using
6 |
7 | 1. [Install Hugo](https://gohugo.io/overview/installing/)
8 | 2. Clone this repository
9 |
10 | ```bash
11 | git clone https://github.com/gohugoio/hugoBasicExample.git
12 | cd hugoBasicExample
13 | ```
14 |
15 | 3. Clone the repository you want to test. If you want to test all Hugo Themes then follow the instructions provided [here](https://github.com/gohugoio/hugoThemes#installing-all-themes)
16 |
17 | 4. Run Hugo and select the theme of your choosing
18 |
19 | ```bash
20 | hugo server -t YOURTHEME
21 | ```
22 |
23 | 5. Under `/content/` this repository contains the following:
24 |
25 | - A section called `/post/` with sample markdown content
26 | - A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle)
27 | - An `about.md` that is intended to provide the `/about/` page for a theme demo
28 |
29 | 6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository
30 |
--------------------------------------------------------------------------------
/exampleSite/config/_default/config.toml:
--------------------------------------------------------------------------------
1 | Title = "Loving life and dreams."
2 | BaseUrl = "/"
3 |
4 | DefaultContentLanguage = "zh-cn"
5 | LanguageCode = "zh-CN"
6 |
7 | Theme = "hugo-theme-next"
8 |
9 | MetaDataFormat = "toml"
10 |
11 | PaginatePath = "p"
12 | Paginate = 5
13 |
14 | DisablePathToLower = false
15 |
16 | PreserveTaxonomyNames = false
17 |
18 | PygmentsStyle = "emacs"
19 | pygmentsCodefences = true
20 | pygmentsCodefencesGuessSyntax = true
21 |
22 | enableRobotsTXT = true
23 | enableEmoji = false
24 | hasCJKLanguage = true
25 |
26 | timeout = 100000
27 | ignoreErrors = ["error-remote-getjson"]
28 |
29 | [sitemap]
30 | filename = "sitemap.xml"
31 | changefreq = "weekly"
32 | priority = 0.5
33 |
34 | [outputFormats]
35 | [outputFormats.SearchIndex]
36 | mediaType = "application/xml"
37 | baseName = "searchindex"
38 | isPlainText = true
39 | notAlternative = true
40 |
41 | [outputs]
42 | home = ["HTML", "RSS", "SearchIndex"]
43 |
44 | [minify]
45 | disableCSS = false
46 | disableHTML = false
47 | disableJS = false
48 | disableJSON = false
49 | disableSVG = false
50 | disableXML = false
51 | minifyOutput = true
52 |
53 | ## 让Markdown支持写HTML语法
54 | [markup]
55 | [markup.goldmark]
56 | [markup.goldmark.renderer]
57 | unsafe = true
--------------------------------------------------------------------------------
/exampleSite/config/_default/languages.toml:
--------------------------------------------------------------------------------
1 | [zh-CN]
2 | title = "热爱生活与梦想"
3 | languageName = "中文"
4 | weight = 1
5 | contentdir = "content/zh-CN"
6 |
7 | [en]
8 | title = "Loving life and dreams."
9 | languageName = "English"
10 | weight = 2
11 | contentdir = "content/en"
12 |
--------------------------------------------------------------------------------
/exampleSite/config/_default/menu.en.toml:
--------------------------------------------------------------------------------
1 | [[Main]]
2 | Name = "Home"
3 | Pre = "home"
4 | URL = "/"
5 | Weight = 1
6 | [[Main]]
7 | Name = "Archive"
8 | Pre = "archive"
9 | URL = "post"
10 | Weight = 2
11 | [[Main]]
12 | Name = "About"
13 | Pre = "user"
14 | URL = "about.html"
15 | Weight = 3
16 | [[Main]]
17 | Name = "Page404"
18 | Pre = "heartbeat"
19 | URL = "404.html"
20 | Weight = 4
--------------------------------------------------------------------------------
/exampleSite/config/_default/menu.zh-CN.toml:
--------------------------------------------------------------------------------
1 | [[Main]]
2 | Name = "首页"
3 | Pre = "home"
4 | URL = "/"
5 | Weight = 1
6 | [[Main]]
7 | Name = "归档"
8 | Pre = "archive"
9 | URL = "post"
10 | Weight = 2
11 | [[Main]]
12 | Name = "关于我"
13 | Pre = "user"
14 | URL = "about.html"
15 | Weight = 3
16 | [[Main]]
17 | Name = "公益404"
18 | Pre = "heartbeat"
19 | URL = "404.html"
20 | Weight = 4
--------------------------------------------------------------------------------
/exampleSite/config/_default/params.en.toml:
--------------------------------------------------------------------------------
1 | Description = "Weclome to Elkan's blog site that who is best on program develop, pre-sales and big data."
2 | Keywords = "Blog, Software, Big Data, Product, Architecture, Java, Kylin"
3 | Subtitle = "Don't stop running forward!"
4 | AuthorImg = "/img/avatar.png"
5 | AuthorName = "Elkan.Li"
6 | Introduce = "Never forget your dreams!"
7 | DateFormat = "2006/01/02"
8 | YearFormat = "2006Y"
9 | MonthFormat = "01/02"
10 |
11 | ArticleDeclContent = "This blog post article is under the CC BY-NC-SA 3.0 license,Please indicate the source!"
12 |
13 | [Footer]
14 | StorageLink = "https://gitee.com/"
15 | StorageName = "Gitee Repository"
16 | ICPLink = "http://beian.miit.gov.cn"
17 | ICPNo = "ICP.NO 18047355"
18 |
19 | [[Socials]]
20 | Name = "GitHub"
21 | Icon = "github"
22 | URL = "https://github.com/elkan1788/"
23 |
24 | [[Socials]]
25 | Name = "ZhiHu"
26 | Icon = "globe"
27 | URL = "https://www.zhihu.com/people/fan-meng-xing-chen-1"
28 |
29 | [[Links]]
30 | Name = "Nutz"
31 | Permalink = "https://nutzam.com/"
32 |
33 | [[Links]]
34 | Name = "JFinal"
35 | Permalink = "https://jfinal.com/"
36 |
37 | [[Links]]
38 | Name = "Wendal"
39 | Permalink = "http://wendal.net/"
40 |
41 | [[Links]]
42 | Name = "LiaoXueFeng"
43 | Permalink = "https://www.liaoxuefeng.com/"
--------------------------------------------------------------------------------
/exampleSite/config/_default/params.toml:
--------------------------------------------------------------------------------
1 | [TagsCloud]
2 | Enable = true
3 | Limit = 10
4 |
5 | [Share]
6 | Enable = true
7 | AddthisId = "Your AddthisId"
8 |
9 | [Comment]
10 | Enable = true
11 | Module = "Waline"
12 | LiveReId = "Your LiveReId"
13 | WalineSerURL = "Your WalineSerURL"
14 |
15 | # If Module is "Utterances",see https://utteranc.es/
16 | UtterancesRepo = "owner/repo"
17 | UtterancesTheme = "github-light"
18 | UtterancesTitle = "pathname"
19 |
20 | [LeanCloud]
21 | AppId = "Your LCAppId"
22 | AppKey = "Your LCAppKey"
23 | ServerURL = "Your LCServer"
24 |
25 | [Statis]
26 | BusuanziCounter = true
27 | # CNNZSiteId = "Your CNNZSiteId"
28 | # BaiduSiteId = "Your BaiduSiteId"
29 | # GoogleSiteId = "Your GoogleSiteId"
30 | # LaSiteId = "Your LaSiteId"
31 |
32 | [OnlineIM]
33 | Enable = false
34 | # DaoVoiceId = "Your DaoVoiceId"
35 |
36 | [Others]
37 | # RevolverMapId = "Your RevolverMapId"
--------------------------------------------------------------------------------
/exampleSite/config/_default/params.zh-CN.toml:
--------------------------------------------------------------------------------
1 | Description = "欢迎来到凡梦星尘空间站,个人主要专注于程序开发,产品,售前及大数据解决方案。"
2 | Keywords = "博客, 程序员, 架构师, 思考, 读书, 笔记, 技术, 分享, 大数据, 产品"
3 | Subtitle = "没有伞的孩子要学会努力奔跑!"
4 | AuthorImg = "/img/avatar.png"
5 | AuthorName = "凡梦星尘"
6 | Introduce = "再平凡的人也有属于他自己的梦想!"
7 | DateFormat = "2006-01-02"
8 | YearFormat = "2006年"
9 | MonthFormat = "01-02"
10 |
11 | ArticleDeclContent = "本博客文章除特别声明外,均采用 CC BY-NC-SA 3.0许可协议,转载请注明出处!"
12 |
13 | [Footer]
14 | StorageLink = "https://gitee.com/"
15 | StorageName = "Gitee 仓库"
16 | ICPLink = "http://beian.miit.gov.cn"
17 | ICPNo = "粤 ICP 备 18047355 号"
18 |
19 | [[Socials]]
20 | Name = "GitHub"
21 | Icon = "github"
22 | URL = "https://github.com/elkan1788/"
23 |
24 | [[Socials]]
25 | Name = "知乎"
26 | Icon = "globe"
27 | URL = "https://www.zhihu.com/people/fan-meng-xing-chen-1"
28 |
29 | [[Links]]
30 | Name = "Nutz"
31 | Permalink = "https://nutzam.com/"
32 |
33 | [[Links]]
34 | Name = "JFinal"
35 | Permalink = "https://jfinal.com/"
36 |
37 | [[Links]]
38 | Name = "Wendal"
39 | Permalink = "http://wendal.net/"
40 |
41 | [[Links]]
42 | Name = "廖雪峰"
43 | Permalink = "https://www.liaoxuefeng.com/"
--------------------------------------------------------------------------------
/exampleSite/configTaxo.toml:
--------------------------------------------------------------------------------
1 | timeout = 30000
2 | enableInlineShortcodes = true
3 |
4 | [taxonomies]
5 | category = "categories"
6 | tag = "tags"
7 | series = "series"
8 |
9 | [privacy]
10 |
11 | [privacy.vimeo]
12 | disabled = false
13 | simple = true
14 |
15 | [privacy.twitter]
16 | disabled = false
17 | enableDNT = true
18 | simple = true
19 | disableInlineCSS = true
20 |
21 | [privacy.instagram]
22 | disabled = false
23 | simple = true
24 |
25 | [privacy.youtube]
26 | disabled = false
27 | privacyEnhanced = true
28 |
--------------------------------------------------------------------------------
/exampleSite/content/en/_index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Home
3 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en/about/index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "About"
3 | description = "Hugo, the world's fastest framework for building websites"
4 | date = "2019-02-28"
5 | author = "Hugo Authors"
6 | url = "/en/about.html"
7 | type = "about"
8 | +++
9 |
10 | Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
11 |
12 | Hugo makes use of a variety of open source projects including:
13 |
14 | * https://github.com/yuin/goldmark
15 | * https://github.com/alecthomas/chroma
16 | * https://github.com/muesli/smartcrop
17 | * https://github.com/spf13/cobra
18 | * https://github.com/spf13/viper
19 |
20 | Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
21 |
22 | Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
23 |
24 | Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
25 |
26 | Learn more and contribute on [GitHub](https://github.com/gohugoio).
27 |
--------------------------------------------------------------------------------
/exampleSite/content/en/post/emoji-support.md:
--------------------------------------------------------------------------------
1 | +++
2 | author = "Hugo Authors"
3 | title = "Emoji Support"
4 | date = "2019-03-05"
5 | description = "Guide to emoji usage in Hugo"
6 | tags = [
7 | "emoji",
8 | ]
9 | +++
10 |
11 | Emoji can be enabled in a Hugo project in a number of ways.
12 |
13 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
14 |
15 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
16 |
17 | ### Monkey
18 |
19 |
20 |
21 | 🙈
22 | :see_no_evil:
23 |
24 |
25 | 🙉
26 | :hear_no_evil:
27 |
28 |
29 | 🙊
30 | :speak_no_evil:
31 |
32 |
39 |
40 | 1️⃣
41 | :one:
42 |
43 |
44 | 2️⃣
45 | :two:
46 |
47 |
48 | 3️⃣
49 | :three:
50 |
51 |
58 |
59 | 🏡
60 | :house_with_garden:
61 |
62 |
63 | 🏣
64 | :post_office:
65 |
66 |
67 | 🏥
68 | :hospital:
69 |
70 |
Test
111 | 112 | 113 | ``` 114 | 115 | #### Code block indented with four spaces 116 | 117 | 118 | 119 | 120 | 121 |Test
125 | 126 | 127 | 128 | #### Code block with Hugo's internal highlight shortcode 129 | {{< highlight html >}} 130 | 131 | 132 | 133 | 134 |Test
138 | 139 | 140 | {{< /highlight >}} 141 | 142 | ## List Types 143 | 144 | #### Ordered List 145 | 146 | 1. First item 147 | 2. Second item 148 | 3. Third item 149 | 150 | #### Unordered List 151 | 152 | * List item 153 | * Another item 154 | * And another item 155 | 156 | #### Nested list 157 | 158 | * Fruit 159 | * Apple 160 | * Orange 161 | * Banana 162 | * Dairy 163 | * Milk 164 | * Cheese 165 | 166 | ## Other Elements — abbr, sub, sup, kbd, mark 167 | 168 | GIF is a bitmap image format. 169 | 170 | H2O 171 | 172 | Xn + Yn = Zn 173 | 174 | Press CTRL+ALT+Delete to end the session. 175 | 176 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 177 | -------------------------------------------------------------------------------- /exampleSite/content/en/post/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: Math Typesetting 4 | date: 2019-03-08 5 | description: A brief guide to setup MathJax 6 | math: true 7 | --- 8 | 9 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 10 | 11 | 12 | In this example we will be using [MathJax](https://www.mathjax.org/) 13 | 14 | - Create a post under `/content/en[zh-CN]/math.md` 15 | 16 | - To enable MathJax globally set the parameter `math` to `true` in a project's configuration 17 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 18 | 19 | **Note:** Use the online reference of [Supported TeX Functions](https://docs.mathjax.org/en/latest/input/tex/index.html) 20 | 21 | ### Examples 22 | 23 | 24 | ## Repeating fractions 25 | $$ 26 | \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } 27 | $$ 28 | 29 | 30 | ## Summation notation 31 | $$ 32 | \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) 33 | $$ 34 | 35 | 36 | ## Sum of a Series 37 | I broke up the next two examples into separate lines so it behaves better on a mobile phone. That's why they include \displaystyle. 38 | 39 | $$ 40 | \displaystyle\sum_{i=1}^{k+1}i 41 | $$ 42 | 43 | $$ 44 | \displaystyle= \left(\sum_{i=1}^{k}i\right) +(k+1) 45 | $$ 46 | 47 | $$ 48 | \displaystyle= \frac{k(k+1)}{2}+k+1 49 | $$ 50 | 51 | $$ 52 | \displaystyle= \frac{k(k+1)+2(k+1)}{2} 53 | $$ 54 | 55 | $$ 56 | \displaystyle= \frac{(k+1)(k+2)}{2} 57 | $$ 58 | 59 | $$ 60 | \displaystyle= \frac{(k+1)((k+1)+1)}{2} 61 | $$ 62 | 63 | ## Product notation 64 | $$ 65 | \displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \displaystyle \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \displaystyle\text{ for }\lvert q\rvert < 1. 66 | $$ 67 | 68 | 69 | ## Inline math 70 | And here is some in-line math: $$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $$ , followed by some more text. 71 | 72 | 73 | ## Greek Letters 74 | $$ 75 | \Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega 76 | \alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi 77 | $$ 78 | 79 | 80 | ## Arrows 81 | $$ 82 | \gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow 83 | $$ 84 | 85 | $$ 86 | \Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow 87 | \leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow 88 | $$ 89 | 90 | $$ 91 | \Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup 92 | $$ 93 | 94 | $$ 95 | \rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow 96 | $$ 97 | 98 | 99 | ## Symbols 100 | $$ 101 | \surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup 102 | $$ 103 | 104 | $$ 105 | \bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle 106 | $$ 107 | 108 | 109 | ## Calculus 110 | $$ 111 | \int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx 112 | $$ 113 | 114 | $$ 115 | f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} 116 | $$ 117 | 118 | $$ 119 | \oint \vec{F} \cdot d\vec{s}=0 120 | $$ 121 | 122 | 123 | ## Lorenz Equations 124 | $$ 125 | \begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned} 126 | $$ 127 | 128 | 129 | ## Cross Product 130 | This works in KaTeX, but the separation of fractions in this environment is not so good. 131 | 132 | $$ 133 | \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} 134 | $$ 135 | 136 | Here's a workaround: make the fractions smaller with an extra class that targets the spans with "mfrac" class (makes no difference in the MathJax case): 137 | 138 | $$ 139 | \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} 140 | $$ 141 | 142 | 143 | ## Accents 144 | $$ 145 | \hat{x}\ \vec{x}\ \ddot{x} 146 | $$ 147 | 148 | 149 | ## Stretchy brackets 150 | $$ 151 | \left(\frac{x^2}{y^3}\right) 152 | $$ 153 | 154 | 155 | ## Evaluation at limits 156 | $$ 157 | \left.\frac{x^3}{3}\right|_0^1 158 | $$ 159 | 160 | 161 | ## Case definitions 162 | $$ 163 | f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\ 3n+1, & \text{if } n\text{ is odd} \end{cases} 164 | $$ 165 | 166 | 167 | ## Maxwell's Equations 168 | $$ 169 | \begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 170 | $$ 171 | 172 | These equations are quite cramped. We can add vertical spacing using (for example) [1em] after each line break (\\). as you can see here: 173 | 174 | $$ 175 | \begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\[1em] \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\[0.5em] \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\[1em] \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 176 | $$ 177 | 178 | 179 | ## Statistics 180 | Definition of combination: 181 | 182 | $$ 183 | \frac{n!}{k!(n-k)!} = {^n}C_k 184 | {n \choose k} 185 | $$ 186 | 187 | ## Fractions on fractions 188 | $$ 189 | \frac{\frac{1}{x}+\frac{1}{y}}{y-z} 190 | $$ 191 | 192 | 193 | ## n-th root 194 | $$ 195 | \sqrt[n]{1+x+x^2+x^3+\ldots} 196 | $$ 197 | 198 | 199 | ## Matrices 200 | $$ 201 | \begin{pmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33} \end{pmatrix} 202 | \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} 203 | $$ 204 | 205 | 206 | ## Punctuation 207 | $$ 208 | f(x) = \sqrt{1+x} \quad (x \ge -1) 209 | f(x) \sim x^2 \quad (x\to\infty) 210 | $$ 211 | 212 | Now with punctuation: 213 | 214 | $$ 215 | f(x) = \sqrt{1+x}, \quad x \ge -1 216 | f(x) \sim x^2, \quad x\to\infty 217 | $$ -------------------------------------------------------------------------------- /exampleSite/content/en/post/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Placeholder Text" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | tags = [ 7 | "markdown", 8 | "text", 9 | ] 10 | +++ 11 | 12 | Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 13 | 14 | 1. Exierant elisi ambit vivere dedere 15 | 2. Duce pollice 16 | 3. Eris modo 17 | 4. Spargitque ferrea quos palude 18 | 19 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 20 | 21 | 1. Comas hunc haec pietate fetum procerum dixit 22 | 2. Post torum vates letum Tiresia 23 | 3. Flumen querellas 24 | 4. Arcanaque montibus omnes 25 | 5. Quidem et 26 | 27 | # Vagus elidunt 28 | 29 | 30 | 31 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 32 | 33 | ## Mane refeci capiebant unda mulcebat 34 | 35 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 36 | 37 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 38 | 39 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 40 | 41 | {{< css.inline >}} 42 | 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/en/post/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Rich Content" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | tags = [ 7 | "shortcodes", 8 | "privacy", 9 | ] 10 | +++ 11 | 12 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 13 | 14 | --- 15 | 16 | ## YouTube Privacy Enhanced Shortcode 17 | 18 | {{/*< youtube ZJthWmvUzzc >*/}} 19 | 20 |
22 |
23 | 🙈
24 | :see_no_evil:
25 |
26 |
27 | 🙉
28 | :hear_no_evil:
29 |
30 |
31 | 🙊
32 | :speak_no_evil:
33 |
34 |
41 |
42 | 1️⃣
43 | :one:
44 |
45 |
46 | 2️⃣
47 | :two:
48 |
49 |
50 | 3️⃣
51 | :three:
52 |
53 |
60 |
61 | 🏡
62 | :house_with_garden:
63 |
64 |
65 | 🏣
66 | :post_office:
67 |
68 |
69 | 🏥
70 | :hospital:
71 |
72 |
Test
113 | 114 | 115 | ``` 116 | 117 | ## 用四个空格缩进的代码块 118 | 119 | 120 | 121 | 122 | 123 |Test
127 | 128 | 129 | 130 | ## 代码块引用Hugo的内部高亮短代码 131 | {{< highlight html >}} 132 | 133 | 134 | 135 | 136 |Test
140 | 141 | 142 | {{< /highlight >}} 143 | 144 | # 列表类型 145 | 146 | ## 有序列表 147 | 148 | 1. First item 149 | 2. Second item 150 | 3. Third item 151 | 152 | ## 无序列表 153 | 154 | * List item 155 | * Another item 156 | * And another item 157 | 158 | ## 嵌套列表 159 | 160 | * Fruit 161 | * Apple 162 | * Orange 163 | * Banana 164 | * Dairy 165 | * Milk 166 | * Cheese 167 | 168 | ## 其他元素 — abbr, sub, sup, kbd, mark 169 | 170 | GIF 是位图图像格式。 171 | 172 | H2O 173 | 174 | Xn + Yn = Zn 175 | 176 | 按 CTRL+ALT+Delete 组合键结束会话。 177 | 178 | 大多数蝾螈在夜间活动,捕食昆虫、蠕虫和其他小动物。 179 | -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/post/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: 数据公式设置显示 4 | date: 2019-03-08 5 | description: 设置MathJax的简要指南 6 | math: true 7 | --- 8 | 9 | Hugo 项目中的数学表示法可以通过使用第三方 JavaScript 库来实现。 10 | 11 | 12 | 在这个例子中,我们将使用 [MathJax](https://www.mathjax.org/) 13 | 14 | - 创建一个文件 `/content/en[zh-CN]/math.md` 15 | 16 | - 可以全局启用MathJax,请在项目配置中将参数`math`设置为`true` 17 | - 或是在每页基础上启用`MathJax`,在内容文件中包括参数`math: true` 18 | 19 | **注意:** 使用[支持的TeX功能](https://docs.mathjax.org/en/latest/input/tex/index.html)的联机参考资料 20 | 21 | ### 例子 22 | 23 | 24 | ## 重复的分数 25 | $$ 26 | \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } 27 | $$ 28 | 29 | 30 | ## 总和记号 31 | $$ 32 | \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) 33 | $$ 34 | 35 | 36 | ## 几何级数之和 37 | 我把接下来的两个例子分成了几行,这样它在手机上表现得更好。这就是为什么它们包含 `\displaystyle`。 38 | 39 | $$ 40 | \displaystyle\sum_{i=1}^{k+1}i 41 | $$ 42 | 43 | $$ 44 | \displaystyle= \left(\sum_{i=1}^{k}i\right) +(k+1) 45 | $$ 46 | 47 | $$ 48 | \displaystyle= \frac{k(k+1)}{2}+k+1 49 | $$ 50 | 51 | $$ 52 | \displaystyle= \frac{k(k+1)+2(k+1)}{2} 53 | $$ 54 | 55 | $$ 56 | \displaystyle= \frac{(k+1)(k+2)}{2} 57 | $$ 58 | 59 | $$ 60 | \displaystyle= \frac{(k+1)((k+1)+1)}{2} 61 | $$ 62 | 63 | ## 乘记号 64 | $$ 65 | \displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \displaystyle \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \displaystyle\text{ for }\lvert q\rvert < 1. 66 | $$ 67 | 68 | 69 | ## 随文数式 70 | 这是一些线性数学: $$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $$ , 然后是更多的文本。 71 | 72 | 73 | ## 希腊字母 74 | $$ 75 | \Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega 76 | \alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi 77 | $$ 78 | 79 | 80 | ## 箭头 81 | $$ 82 | \gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow 83 | $$ 84 | 85 | $$ 86 | \Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow 87 | \leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow 88 | $$ 89 | 90 | $$ 91 | \Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup 92 | $$ 93 | 94 | $$ 95 | \rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow 96 | $$ 97 | 98 | 99 | ## 符号 100 | $$ 101 | \surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup 102 | $$ 103 | 104 | $$ 105 | \bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle 106 | $$ 107 | 108 | 109 | ## 微积分学 110 | $$ 111 | \int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx 112 | $$ 113 | 114 | $$ 115 | f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} 116 | $$ 117 | 118 | $$ 119 | \oint \vec{F} \cdot d\vec{s}=0 120 | $$ 121 | 122 | 123 | ## 洛伦茨方程 124 | $$ 125 | \begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned} 126 | $$ 127 | 128 | 129 | ## 交叉乘积 130 | 这在KaTeX中是可行的,但在这种环境中馏分的分离不是很好。 131 | 132 | $$ 133 | \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} 134 | $$ 135 | 136 | 这里有一个解决方案:使用“mfrac”类(在MathJax情况下没有区别)的额外类使分数更小: 137 | 138 | $$ 139 | \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} 140 | $$ 141 | 142 | 143 | ## 强调 144 | $$ 145 | \hat{x}\ \vec{x}\ \ddot{x} 146 | $$ 147 | 148 | 149 | ## 有弹性的括号 150 | $$ 151 | \left(\frac{x^2}{y^3}\right) 152 | $$ 153 | 154 | 155 | ## 评估范围 156 | $$ 157 | \left.\frac{x^3}{3}\right|_0^1 158 | $$ 159 | 160 | 161 | ## 诊断标准 162 | $$ 163 | f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\ 3n+1, & \text{if } n\text{ is odd} \end{cases} 164 | $$ 165 | 166 | 167 | ## 麦克斯韦方程组 168 | $$ 169 | \begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 170 | $$ 171 | 172 | 这些方程式很狭窄。我们可以使用(例如)添加垂直间距 [1em] 在每个换行符(\\)之后。正如你在这里看到的: 173 | 174 | $$ 175 | \begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\[1em] \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\[0.5em] \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\[1em] \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 176 | $$ 177 | 178 | 179 | ## 统计学 180 | 固定词组: 181 | 182 | $$ 183 | \frac{n!}{k!(n-k)!} = {^n}C_k 184 | {n \choose k} 185 | $$ 186 | 187 | ## 分数在分数 188 | $$ 189 | \frac{\frac{1}{x}+\frac{1}{y}}{y-z} 190 | $$ 191 | 192 | 193 | ## n次方根 194 | $$ 195 | \sqrt[n]{1+x+x^2+x^3+\ldots} 196 | $$ 197 | 198 | 199 | ## 矩阵 200 | $$ 201 | \begin{pmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33} \end{pmatrix} 202 | \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} 203 | $$ 204 | 205 | 206 | ## 标点符号 207 | $$ 208 | f(x) = \sqrt{1+x} \quad (x \ge -1) 209 | f(x) \sim x^2 \quad (x\to\infty) 210 | $$ 211 | 212 | 现在用标点符号: 213 | 214 | $$ 215 | f(x) = \sqrt{1+x}, \quad x \ge -1 216 | f(x) \sim x^2, \quad x\to\infty 217 | $$ 218 | -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/post/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "图像占位符显示" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | tags = [ 7 | "markdown", 8 | "text", 9 | ] 10 | +++ 11 | 12 | 范德格拉夫原理(Van de Graaf Canon)重构了曾经用于书籍设计中将页面划分为舒适比例的方法。这一原理也被称为“秘密原理”,用于许多中世纪的手稿和古板书中。在范德格拉夫原理中,文本区域和页面的长款具有相同的比例,并且文本区域的高度等于页面宽度,通过划分页面得到九分之一的订口边距和九分之二的切口边距,以及与页面长宽相同的比例的文本区域。 13 | 14 | 15 | 16 | 17 | # Vagus 示例 18 | 19 | 20 | 21 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 22 | 23 | ## 总结 24 | 25 | 当然设计中的黄金比例是为人所熟知的,黄金分割的公式为`a:b=b:(a+b)`。这是指较小的两个矩形与较大的两个矩形以相同的组合方式相关联。黄金分割比例为**1:1.618**。 26 | -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/post/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "富文本内容测试" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | tags = [ 7 | "shortcodes", 8 | "privacy", 9 | ] 10 | +++ 11 | 12 | Hugo 上有几个[**内置短码**](https://gohugo.io/content-management/shortcodes/#use-hugos),用于丰富内容,以及[**隐私配置**](https://gohugo.io/about/hugo-and-gdpr/)还有一组简单的短代码,支持各种社交媒体嵌入的静态和非 JS 版本。 13 | 14 | 15 | 16 | ## YouTube 增强隐私短码 17 | 18 | {{/*< youtube ZJthWmvUzzc >*/}} 19 | 20 |