├── .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 | [![Go Enviroment](https://img.shields.io/static/v1?label=GoLang&message=1.12.1&color=%2300ADD8&logo=Go)](https://studygolang.com/dl#go1.12.1) 2 | [![Build Hugo Version](https://img.shields.io/static/v1?label=Hugo&message=0.87.0&color=%23FF4088&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0) 3 | ![GitHub branch checks state](https://img.shields.io/github/checks-status/elkan1788/hugo-theme-next/main?label=Check%20State&logo=Checkmarx) 4 | [![Build Status](https://img.shields.io/travis/com/elkan1788/hugo-theme-next/main?label=Building&logo=Travis%20CI)](https://travis-ci.com/elkan1788/hugo-theme-next) 5 | [![GitHub deployments](https://img.shields.io/github/deployments/elkan1788/hugo-theme-next/github-pages?label=gh-pg&logo=GitHub)](https://github.com/elkan1788/hugo-theme-next/tree/gh-pg) 6 | [![Repos Size](https://img.shields.io/github/repo-size/elkan1788/hugo-theme-next?color=%23FFBF3B&logo=Files)](https://github.com/elkan1788/hugo-theme-next/releases) 7 | [![Release Version](https://img.shields.io/github/v/release/elkan1788/hugo-theme-next?color=%230082C9&label=Release&logo=Next.js)](https://github.com/elkan1788/hugo-theme-next/releases/latest) 8 | ![GitHub](https://img.shields.io/github/license/elkan1788/hugo-theme-next?label=License&logo=WebAuthn) 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 | ![my-hugo-blog.png](https://lisenhui.gitee.io/imgs/blog/my-hugo-blog.png) 54 | 55 | Some browsers compatible with PC tests are as follows: 56 | 57 | [![Coogle Chrome](https://img.shields.io/static/v1?label=Chrome&message=92.0.45%2B&color=%234285F4&logo=GoogleChrome)](#) 58 | [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=91.0.2%2B&color=%23FF7139&logo=Firefox)](#) 59 | [![Safari](https://img.shields.io/static/v1?label=Safari&message=14.7.1%2B&color=%23212E50&logo=Safari)](#) 60 | [![Microsoft Edge](https://img.shields.io/static/v1?label=Microsoft%20Edge&message=44.18362%2B&color=%230078D7&logo=Microsoft%20Edge)](#) 61 | [![Internet Exporler](https://img.shields.io/static/v1?label=IE&message=11.356%2B&color=%230076D6&logo=Internet%20Explorer)](#) 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 | [![Live Demo](https://asciinema.org/a/434226.svg)](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 | [![Go Enviroment](https://img.shields.io/static/v1?label=GoLang&message=1.12.1&color=%2300ADD8&logo=Go)](https://studygolang.com/dl#go1.12.1) 2 | [![Build Hugo Version](https://img.shields.io/static/v1?label=Hugo&message=0.87.0&color=%23FF4088&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0) 3 | ![GitHub branch checks state](https://img.shields.io/github/checks-status/elkan1788/hugo-theme-next/main?label=Check%20State&logo=Checkmarx) 4 | [![Build Status](https://img.shields.io/travis/com/elkan1788/hugo-theme-next/main?label=Building&logo=Travis%20CI)](https://travis-ci.com/elkan1788/hugo-theme-next) 5 | [![GitHub deployments](https://img.shields.io/github/deployments/elkan1788/hugo-theme-next/github-pages?label=gh-pg&logo=GitHub)](https://github.com/elkan1788/hugo-theme-next/tree/gh-pg) 6 | [![Repos Size](https://img.shields.io/github/repo-size/elkan1788/hugo-theme-next?color=%23FFBF3B&logo=Files)](https://github.com/elkan1788/hugo-theme-next/releases) 7 | [![Release Version](https://img.shields.io/github/v/release/elkan1788/hugo-theme-next?color=%230082C9&label=Release&logo=Next.js)](https://github.com/elkan1788/hugo-theme-next/releases/latest) 8 | ![GitHub](https://img.shields.io/github/license/elkan1788/hugo-theme-next?label=License&logo=WebAuthn) 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 | ![my-hugo-blog.png](https://lisenhui.gitee.io/imgs/blog/my-hugo-blog.png) 53 | 54 | 其中PC端测试兼容的部分浏览器有: 55 | 56 | [![Coogle Chrome](https://img.shields.io/static/v1?label=Chrome&message=92.0.45%2B&color=%234285F4&logo=GoogleChrome)](#) 57 | [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=91.0.2%2B&color=%23FF7139&logo=Firefox)](#) 58 | [![Safari](https://img.shields.io/static/v1?label=Safari&message=14.7.1%2B&color=%23212E50&logo=Safari)](#) 59 | [![Microsoft Edge](https://img.shields.io/static/v1?label=Microsoft%20Edge&message=44.18362%2B&color=%230078D7&logo=Microsoft%20Edge)](#) 60 | [![Internet Exporler](https://img.shields.io/static/v1?label=IE&message=11.356%2B&color=%230076D6&logo=Internet%20Explorer)](#) 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 | [![Live Demo](https://asciinema.org/a/434226.svg)](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 |

33 | 34 | --- 35 | 36 | ### Number 37 | 38 |

39 | 40 | 1️⃣ 41 | :one: 42 | 43 | 44 | 2️⃣ 45 | :two: 46 | 47 | 48 | 3️⃣ 49 | :three: 50 | 51 |

52 | 53 | --- 54 | 55 | ### Building 56 | 57 |

58 | 59 | 🏡 60 | :house_with_garden: 61 | 62 | 63 | 🏣 64 | :post_office: 65 | 66 | 67 | 🏥 68 | :hospital: 69 | 70 |

71 | 72 | The [Emoji cheat sheet](ttps://www.webfx.com/tools/emoji-cheat-sheet/) is a useful reference for emoji shorthand codes. 73 | 74 | *** 75 | 76 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 77 | 78 | {{< highlight html >}} 79 | .emoji { 80 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 81 | } 82 | {{< /highlight >}} 83 | 84 | {{< css.inline >}} 85 | 98 | {{< /css.inline >}} 99 | -------------------------------------------------------------------------------- /exampleSite/content/en/post/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Markdown Syntax Guide" 4 | date = "2019-03-11" 5 | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | tags = [ 7 | "markdown", 8 | "css", 9 | "html", 10 | ] 11 | categories = [ 12 | "themes", 13 | "syntax", 14 | ] 15 | series = ["Themes Guide"] 16 | aliases = ["migrate-from-jekyl"] 17 | +++ 18 | 19 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 20 | 21 | 22 | ## Headings 23 | 24 | The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. 25 | 26 | # H1 27 | ## H2 28 | ### H3 29 | #### H4 30 | ##### H5 31 | ###### H6 32 | 33 | ## Paragraph 34 | 35 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 36 | 37 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 38 | 39 | ## Blockquotes 40 | 41 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 42 | 43 | #### Blockquote without attribution 44 | 45 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 46 | > **Note** that you can use *Markdown syntax* within a blockquote. 47 | 48 | #### Blockquote with attribution 49 | 50 | > Don't communicate by sharing memory, share memory by communicating.
51 | > — Rob Pike[^1] 52 | 53 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 54 | 55 | ## Tables 56 | 57 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. 58 | 59 | Name | Age 60 | --------|------ 61 | Bob | 27 62 | Alice | 23 63 | 64 | #### Inline Markdown within tables 65 | 66 | | Italics | Bold | Code | 67 | | -------- | -------- | ------ | 68 | | *italics* | **bold** | `code` | 69 | 70 | # Image 71 | 72 | ```html 73 | ![Image Description](Image URL) 74 | ``` 75 | 76 | ## Demo 77 | 78 | ### Normal 79 | 80 | ![screenshot.png](//lisenhui.gitee.io/imgs/blog/my-hugo-blog.png) 81 | 82 | ### SVG 83 | 84 | Google Chrome 85 | 86 | Firefox Browser 87 | 88 | ### Icons 89 | 90 | [![Coogle Chrome](https://img.shields.io/static/v1?label=Chrome&message=92.0.45%2B&color=%234285F4&logo=GoogleChrome)](#) 91 | [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=91.0.2%2B&color=%23FF7139&logo=Firefox)](#) 92 | [![Safari](https://img.shields.io/static/v1?label=Safari&message=14.7.1%2B&color=%23212E50&logo=Safari)](#) 93 | [![Microsoft Edge](https://img.shields.io/static/v1?label=Microsoft%20Edge&message=44.18362%2B&color=%230078D7&logo=Microsoft%20Edge)](#) 94 | [![Internet Exporler](https://img.shields.io/static/v1?label=IE&message=11.356%2B&color=%230076D6&logo=Internet%20Explorer)](#) 95 | 96 | > Try to click the image to visit the URL. 97 | 98 | ## Code Blocks 99 | 100 | #### Code block with backticks 101 | 102 | ```html 103 | 104 | 105 | 106 | 107 | Example HTML5 Document 108 | 109 | 110 |

Test

111 | 112 | 113 | ``` 114 | 115 | #### Code block indented with four spaces 116 | 117 | 118 | 119 | 120 | 121 | Example HTML5 Document 122 | 123 | 124 |

Test

125 | 126 | 127 | 128 | #### Code block with Hugo's internal highlight shortcode 129 | {{< highlight html >}} 130 | 131 | 132 | 133 | 134 | Example HTML5 Document 135 | 136 | 137 |

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 |
21 | 22 | --- 23 | 24 | ## Twitter Simple Shortcode 25 | 26 | {{/*< twitter_simple 1085870671291310081 >*/}} 27 | 28 |
29 | 30 | --- 31 | 32 | ## Vimeo Simple Shortcode 33 | 34 | {{/*< vimeo_simple 48912912 >*/}} 35 | 36 | --- 37 | 38 | ## Bilibili Shortcode 39 | 40 | {{< bilibili BV1m4411c7ia >}} 41 | -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Home 3 | --- -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/about/index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "关于我" 3 | description = "Hugo,世界上最快的网站建设框架" 4 | date = "2019-02-28" 5 | author = "Hugo Authors" 6 | url = "about.html" 7 | type = "about" 8 | +++ 9 | 10 | Hugo是用Go编写的一个开放源代码静态站点生成器,可在[Apache许可证2.0](https://github.com/gohugoio/hugo/blob/master/LICENSE)下使用。 Hugo支持TOML, YAML和JSON数据文件类型,Markdown和HTML内容文件,并使用短代码添加丰富的内容。其他值得注意的功能包括分类法、多语言模式、图像处理、自定义输出格式、HTML/CSS/JS缩小和对Sass SCSS工作流的支持。 11 | 12 | Hugo使用了多种开源项目,包括: 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是博客、企业网站、创意作品集、在线杂志、单页应用程序甚至是数千页的网站的理想选择。 21 | 22 | Hugo适合那些想要手工编写自己的网站代码,而不用担心设置复杂的运行时、依赖关系和数据库的人。 23 | 24 | 使用Hugo建立的网站非常快速、安全,可以部署在任何地方,包括AWS、GitHub Pages、Heroku、Netlify和任何其他托管提供商。 25 | 26 | 更多信息请访问[GitHub](https://github.com/gohugoio). 27 | -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/post/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "支持Emoji表情符号" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | tags = [ 7 | "emoji", 8 | ] 9 | +++ 10 | 11 | `Emoji` 表情符号可以通过多种方式在 `Hugo` 项目中启用。 12 | 13 | 14 | 15 | 使用 `Emoji` 表情符号可以在模板中可以直接调用 [`emojify`](https://gohugo.io/functions/emojify/) 函数或是通过 [内联短代码](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes) 来实现。 16 | 17 | 如果要全局启用 `Emoji` 表情符号,请在网站[配置](https://gohugo.io/getting-started/configuration/)文件中将 `enableEmoji` 参数值设置为 `true`,然后可以直接在内容文件中输入表情符号简写代码,参考如下: 18 | 19 | ### 猴子表情 20 | 21 |

22 | 23 | 🙈 24 | :see_no_evil: 25 | 26 | 27 | 🙉 28 | :hear_no_evil: 29 | 30 | 31 | 🙊 32 | :speak_no_evil: 33 | 34 |

35 | 36 | --- 37 | 38 | ### 数字符号 39 | 40 |

41 | 42 | 1️⃣ 43 | :one: 44 | 45 | 46 | 2️⃣ 47 | :two: 48 | 49 | 50 | 3️⃣ 51 | :three: 52 | 53 |

54 | 55 | --- 56 | 57 | ### 建筑物 58 | 59 |

60 | 61 | 🏡 62 | :house_with_garden: 63 | 64 | 65 | 🏣 66 | :post_office: 67 | 68 | 69 | 🏥 70 | :hospital: 71 | 72 |

73 | 74 | 更多的 `Emoji` 表情符号代码可参考[`Emoji` 配对目录](https://www.webfx.com/tools/emoji-cheat-sheet/)。 75 | 76 | *** 77 | 78 | **注意:** 以上步骤在 `Hugo` 中启用 `Unicode` 标准表情符号和序列,但是这些符号的呈现取决于浏览器和平台,要设置表情符号的样式,您可以使用第三方表情符号字体或字体。例如: 79 | 80 | {{< highlight html >}} 81 | .emoji { 82 | font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols; 83 | } 84 | {{< /highlight >}} 85 | 86 | {{< css.inline >}} 87 | 100 | {{< /css.inline >}} -------------------------------------------------------------------------------- /exampleSite/content/zh-CN/post/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Markdown语法手册" 4 | date = "2019-03-11" 5 | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | tags = [ 7 | "markdown", 8 | "css", 9 | "html", 10 | ] 11 | categories = [ 12 | "themes", 13 | "syntax", 14 | ] 15 | series = ["Themes Guide"] 16 | aliases = ["migrate-from-jekyl"] 17 | +++ 18 | 19 | 本文提供了一个可以在 `Hugo` 内容文件中使用的基本Markdown语法示例,还展示了基本 HTML 元素在 `Hugo` 主题中是否使用 `CSS` 装饰。 20 | 21 | 22 | # 标题 23 | 24 | 下面的 HTML 代码`

`—`

` 元素表示六个级别的节标题。 25 | `

`是最高的节级别,`

`是最低的节级别。 26 | 27 | # H1 28 | ## H2 29 | ### H3 30 | #### H4 31 | ##### H5 32 | ###### H6 33 | 34 | # 段落 35 | 36 | 生活是什么?生活是柴米油盐的平淡;是行色匆匆早出晚归的奔波;生活是错的时间遇到对的人的遗憾;是爱的付出与回报;生活是看不同的风景,遇到不同的人;是行至水穷尽,坐看云起时的峰回路转;生活是灵魂经历伤痛后的微笑怒放;是挫折坎坷被晾晒后的坚强;生活是酸甜苦辣被岁月沉淀后的馨香;是经历风霜雪雨洗礼后的懂得;生活是走遍千山万水后,回眸一笑的洒脱。 37 | 38 | 有些事,猝不及防,不管你在不在乎;有些人,并非所想,不管你明不明白;有些路,必须得走,不管你愿不愿意。不怕事,不惹事,不避事,做好自己,用真心面对一切;少埋怨,少指责,少发火,学会沉静,用微笑考量一切;多体察,多包容,多思索,尽心尽力,虽缺憾但无悔。像蒲公英一样美丽,虽轻盈,但并不卑微,它有自己的生命,也有自己的世界! 39 | 40 | # 引用 41 | 42 | `blockquote` 元素表示从另一个来源引用的内容,可选的引用必须在 `footer` 或 `cite`元素内,也可选的内嵌更改,如注释和缩写。 43 | 44 | #### 引用没有归属 45 | 46 | > 读懂自我,带着简单的心情,看复杂的人生,走坎坷的路! 47 | > 48 | > **注意:** 可以在块引用中使用 *Markdown* 语法。 49 | 50 | #### 带归属的引用 51 | 52 | > 不要通过分享记忆来交流,通过交流来分享记忆。
53 | > — 罗布·派克[^1] 54 | 55 | [^1]: 以上引文摘自Rob Pike在2015年11月18日 Gopherfest 上的[演讲](https://www.youtube.com/watch?v=PAAkCSZUG1c)。 56 | 57 | # 表格 58 | 59 | 表不是Markdown核心规范的一部分,但是Hugo支持开箱即用。 60 | 61 | Name | Age 62 | --------|------ 63 | Bob | 27 64 | Alice | 23 65 | 66 | #### 表格内使用Markdown语法 67 | 68 | | Italics | Bold | Code | 69 | | -------- | -------- | ------ | 70 | | *italics* | **bold** | `code` | 71 | 72 | # 图像 73 | 74 | ```html 75 | ![图像描述](图像地址) 76 | ``` 77 | 78 | ## 示例 79 | 80 | ### 常规用法 81 | 82 | ![screenshot.png](//lisenhui.gitee.io/imgs/blog/my-hugo-blog.png) 83 | 84 | ### SVG图像 85 | 86 | Google Chrome 87 | 88 | Firefox Browser 89 | 90 | ### 小图标 91 | 92 | [![Coogle Chrome](https://img.shields.io/static/v1?label=Chrome&message=92.0.45%2B&color=%234285F4&logo=GoogleChrome)](#) 93 | [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=91.0.2%2B&color=%23FF7139&logo=Firefox)](#) 94 | [![Safari](https://img.shields.io/static/v1?label=Safari&message=14.7.1%2B&color=%23212E50&logo=Safari)](#) 95 | [![Microsoft Edge](https://img.shields.io/static/v1?label=Microsoft%20Edge&message=44.18362%2B&color=%230078D7&logo=Microsoft%20Edge)](#) 96 | [![Internet Exporler](https://img.shields.io/static/v1?label=IE&message=11.356%2B&color=%230076D6&logo=Internet%20Explorer)](#) 97 | 98 | > 点击图像可以打开图像浏览器,快试试吧。 99 | 100 | # 代码块 101 | 102 | ## 带有引号的代码块 103 | 104 | ```html 105 | 106 | 107 | 108 | 109 | Example HTML5 Document 110 | 111 | 112 |

Test

113 | 114 | 115 | ``` 116 | 117 | ## 用四个空格缩进的代码块 118 | 119 | 120 | 121 | 122 | 123 | Example HTML5 Document 124 | 125 | 126 |

Test

127 | 128 | 129 | 130 | ## 代码块引用Hugo的内部高亮短代码 131 | {{< highlight html >}} 132 | 133 | 134 | 135 | 136 | Example HTML5 Document 137 | 138 | 139 |

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 |
21 | 22 | --- 23 | 24 | ## Twitter 短码 25 | 26 | {{/*< twitter_simple 1085870671291310081 >*/}} 27 | 28 |
29 | 30 | --- 31 | 32 | ## Vimeo 短码 33 | 34 | {{/*< vimeo_simple 48912912 >*/}} 35 | 36 | --- 37 | 38 | ## 哔哩哔哩短码 39 | 40 | {{< bilibili BV1m4411c7ia >}} -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | [StatsCats] 2 | other = "Total {{ len .Data.Terms }} categories" 3 | [StatsTags] 4 | other = "Total {{ len .Data.Terms }} tags" 5 | [StatsBlogs] 6 | other = "Well! Total {{ .Count }} blogs, let's press on." 7 | [Blog] 8 | other = "Blogs" 9 | [Category] 10 | other = "Categories" 11 | [Archive] 12 | other = "Archive" 13 | [Tag] 14 | other = "Tags" 15 | [ToC] 16 | other = "Table of Content" 17 | [RSS] 18 | other = "RSS" 19 | [SiteInfo] 20 | other = "Site Information" 21 | [Link] 22 | other = "Links" 23 | [TagCloud] 24 | other = "TagCloud" 25 | [Time] 26 | other = "Published at" 27 | [View] 28 | other = "Reading" 29 | [ReadMore] 30 | other = "Read More" 31 | [Word] 32 | other = "Words" 33 | [WordCount] 34 | other = "{{ .WordCount }} words" 35 | [ReadingTime] 36 | other = "{{ .ReadingTime }} minutes" 37 | [Colon] 38 | other = ":" 39 | [Visit] 40 | other = "Visited" 41 | [Search] 42 | other = "Search" 43 | [404PageTitle] 44 | other = "Err404, Page not found!" 45 | [BackHomeTip] 46 | other = "Back blog site's Home" 47 | [SearchPhr] 48 | other = "Enter key words..." 49 | [ScanQQCode] 50 | other = "QQ QrCode" 51 | [ArticleTitle] 52 | other = "Title" 53 | [ArticleAuthor] 54 | other = "Author" 55 | [ArticleLink] 56 | other = "Link" 57 | [ArticleDeclaration] 58 | other = "Declaration" 59 | [ArticleDeclContent] 60 | other = "This blog post article is under the CC BY-NC-SA 3.0 license,Please indicate the source!" 61 | [RewardTips] 62 | other = "If it can help you, you can give tips for blogger that how much you want. ^_^" 63 | [RewardBtnText] 64 | other = "Reward" 65 | [RewardWxPay] 66 | other = "Wechat Pay" 67 | [RewardAliPay] 68 | other = "Ali Pay" 69 | [CommentPh] 70 | other = "Just do what you want leave here, and don't forget give your email to make exchange. ^_^" 71 | [UnComment] 72 | other ="Sorry, Waline plugin doesn't support IE or Edge, Please swithc to Chrome browser." 73 | -------------------------------------------------------------------------------- /i18n/zh-CN.toml: -------------------------------------------------------------------------------- 1 | [StatsCats] 2 | other = "目前共计 {{ len .Data.Terms }} 个分类" 3 | [StatsTags] 4 | other = "目前共计 {{ len .Data.Terms }} 个标签" 5 | [StatsBlogs] 6 | other = "目前共计 {{ .Count }} 篇文章, 请继续努力,加油!" 7 | [Blog] 8 | other = "日志" 9 | [Category] 10 | other = "分类" 11 | [Archive] 12 | other = "归档" 13 | [Tag] 14 | other = "标签" 15 | [ToC] 16 | other = "文章目录" 17 | [RSS] 18 | other = "RSS 订阅" 19 | [SiteInfo] 20 | other = "站点概览" 21 | [Link] 22 | other = "友情链接" 23 | [TagCloud] 24 | other = "标签云" 25 | [Time] 26 | other = "时间" 27 | [View] 28 | other = "阅读" 29 | [ReadMore] 30 | other = "阅读全文" 31 | [Word] 32 | other = "字数" 33 | [WordCount] 34 | other = "{{ .WordCount }} 字" 35 | [ReadingTime] 36 | other = "{{ .ReadingTime }}分钟" 37 | [Colon] 38 | other = ":" 39 | [Visit] 40 | other = "阅读次数" 41 | [Search] 42 | other = "搜索" 43 | [404PageTitle] 44 | other = "404错误,页面不存在!" 45 | [BackHomeTip] 46 | other = "返回我的主页" 47 | [SearchPhr] 48 | other = "搜索关键字..." 49 | [ScanQQCode] 50 | other = "QQ扫一扫交流" 51 | [ArticleTitle] 52 | other = "标题" 53 | [ArticleAuthor] 54 | other = "作者" 55 | [ArticleLink] 56 | other = "链接" 57 | [ArticleDeclaration] 58 | other = "声明" 59 | [ArticleDeclContent] 60 | other = "本博客文章除特别声明外,均采用 CC BY-NC-SA 3.0许可协议,转载请注明出处!" 61 | [RewardTips] 62 | other = "创作实属不易,如有帮助,那就打赏博主些许茶钱吧 ^_^" 63 | [RewardBtnText] 64 | other = "赏" 65 | [RewardWxPay] 66 | other = "微信打赏" 67 | [RewardAliPay] 68 | other = "支付宝打赏" 69 | [CommentPh] 70 | other = "欢迎留下您的宝贵建议,请填写您的昵称和邮箱便于后续交流. ^_^" 71 | [UnComment] 72 | other ="抱歉,Waline插件不支持IE或Edge,建议使用Chrome浏览器。" 73 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{ i18n "404PageTitle" }} 15 | 80 | 81 | 82 |
83 |
84 | 返回主页 85 |
86 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | {{ .Text | safeHTML }} 2 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 3 | 32 | 33 | {{ partial "script.html" .}} 34 | 35 | -------------------------------------------------------------------------------- /layouts/_default/list.searchindex.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 3 | {{range where .Site.RegularPages "Kind" "page"}} 4 | 5 | {{ .Title }} 6 | {{ .Permalink }} 7 | 8 | {{ range .Params.categories }}{{ . }}{{ end }} 9 | 10 | 11 | {{ range .Params.tags }} 12 | {{ . }} 13 | {{ end }} 14 | 15 | {{ .Content | plainify }} 16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}page-home{{ end}} 2 | {{ define "main_content" }} 3 |
4 |
5 |
6 | 7 |

8 | 11 |

12 | 13 | 20 | 21 |
22 | 23 |
24 | {{ .Content }} 25 |
26 | 27 |
28 | {{ partial "post/tags.html" .}} 29 | {{ partial "widgets/share.html" .}} 30 | {{ partial "widgets/copyright.html" .}} 31 | {{ partial "widgets/reward.html" .}} 32 | {{ partial "post/prenext.html" .}} 33 | {{ partial "widgets/comment.html" .}} 34 |
35 |
36 |
37 | {{ end }} -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}{{ end}} 2 | 3 | {{ define "main_content" }} 4 |
5 | {{ if eq .Data.Plural "categories" }} 6 |
7 |
8 | {{ i18n "StatsCats" . | safeHTML }} 9 |
10 |
11 |
    12 | {{ range $name, $items := .Site.Taxonomies.categories }} 13 |
  • 14 | {{ $name }} 15 | {{ len $items }} 16 |
  • 17 | {{ end }} 18 |
19 |
20 |
21 | {{ end }} 22 | 23 | {{ if eq .Data.Plural "tags" }} 24 |
25 |
26 | {{ i18n "StatsTags" . | safeHTML }} 27 |
28 |
29 | {{ range $name, $items := .Site.Taxonomies.tags }} 30 | {{ $name }} 31 | {{ len $items }} 32 | {{ end }} 33 |
34 |
35 | {{ end }} 36 |
37 | {{ end }} -------------------------------------------------------------------------------- /layouts/about/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}page-home{{ end}} 2 | {{ define "main_content" }} 3 |
4 |
5 |
6 |

7 | 10 |

11 |
12 |
13 | {{ .Content }} 14 |
15 | 16 |
17 | {{ partial "widgets/comment.html" .}} 18 |
19 |
20 |
21 | {{ end }} -------------------------------------------------------------------------------- /layouts/docs/baseof.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 3 | 33 | 34 | {{ partial "script.html" .}} 35 | 36 | -------------------------------------------------------------------------------- /layouts/docs/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}page-home{{ end}} 2 | {{ define "main_content" }} 3 |
4 |
5 |
6 | 11 |
12 |
13 | {{ .Content }} 14 |
15 | 16 |
17 |
18 | {{ partial "widgets/share.html" .}} 19 | {{ partial "widgets/comment.html" .}} 20 |
21 |
22 |
23 | {{ end }} -------------------------------------------------------------------------------- /layouts/docs/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}page-home{{ end}} 2 | {{ define "main_content" }} 3 |
4 |
5 |
6 | 11 |
12 |
13 | {{ .Content }} 14 |
15 | 16 |
17 |
18 | {{ partial "widgets/share.html" .}} 19 | {{ partial "widgets/comment.html" .}} 20 |
21 |
22 |
23 | {{ end }} -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}page-home{{ end}} 2 | 3 | {{ define "main_content" }} 4 | {{ partial "post_list.html" . }} 5 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 8 |
9 | 10 | Powered by - Hugo v{{ hugo.Version }} 11 | 12 | / 13 | 14 | Theme by - NexT 15 | 16 | 17 |
18 |
19 | {{ partial "widgets/statis.html" .}} 20 |
21 |
22 | 23 | Storage by 24 | {{ .Site.Params.Footer.StorageName }} 25 | 26 | / 27 | 28 | {{ .Site.Params.Footer.ICPNo }} 29 | 30 |
-------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{if .IsHome }} {{ .Site.Title}} {{ else }} {{ .Title }} - {{ .Site.Title }} {{ end }} 9 | {{ if .Keywords }} 10 | 11 | {{ else }} 12 | 13 | {{ end }} 14 | {{ with .Site.Params.AuthorName }} 15 | 16 | {{ end }} 17 | 18 | 19 | 20 | 21 | {{ with .Description }} 22 | 23 | {{ else }} 24 | 25 | {{ end }} 26 | 27 | 28 | 29 | 30 | {{ if .IsPage }} 31 | 32 | {{ end }} 33 | 34 | 35 | {{ if isset .Site.Params.Statis "baidusiteid" }} 36 | 37 | 46 | 47 | {{ end }} 48 | {{ if isset .Site.Params.Statis "googlesiteid" }} 49 | 50 | 51 | 58 | 59 | {{ end }} 60 | {{ if isset .Site.Params.Statis "lasiteid" }} 61 | 62 | 63 | 64 | 65 | 66 | {{ end }} 67 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 | 9 | 43 | 44 | 49 |
50 | 51 | -------------------------------------------------------------------------------- /layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | {{ $pag := .Paginator }} 2 | {{ $tps := $pag.TotalPages }} 3 | 4 | {{ $begin := sub $pag.PageNumber 4}} 5 | {{ $.Scratch.Set "begin" $begin }} 6 | {{ $end := add $pag.PageNumber 4}} 7 | {{ $.Scratch.Set "end" $end }} 8 | 9 | {{ if lt $begin 0}} 10 | {{ $end := sub $end $begin }} 11 | {{ $.Scratch.Set "end" $end }} 12 | {{ end}} 13 | {{ $end := $.Scratch.Get "end"}} 14 | 15 | {{ $over := sub $tps $end }} 16 | 17 | {{ if lt $over 0}} 18 | {{ $begin := add $begin $over}} 19 | {{ $.Scratch.Set "begin" $begin }} 20 | {{ end }} 21 | {{ $begin := $.Scratch.Get "begin"}} 22 | 23 | 36 | -------------------------------------------------------------------------------- /layouts/partials/post/category.html: -------------------------------------------------------------------------------- 1 | {{ if isset .Params "categories" }} 2 | {{ if not (eq (len .Params.categories) 0) }} 3 | 15 | {{ end }} 16 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/post/date.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /layouts/partials/post/prenext.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ with .NextInSection }} 4 | 7 | {{end}} 8 |
9 | 10 |
11 | {{ with .PrevInSection }} 12 | 16 | {{end}} 17 |
18 |
-------------------------------------------------------------------------------- /layouts/partials/post/readtime.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ i18n "ReadingTime" .}} 5 | -------------------------------------------------------------------------------- /layouts/partials/post/tags.html: -------------------------------------------------------------------------------- 1 | {{ if isset .Params "tags" }} 2 | {{ if not (eq (len .Params.tags) 0) }} 3 | 8 | {{ end }} 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /layouts/partials/post/visitors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /layouts/partials/post/wordcount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ i18n "WordCount" .}} 5 | -------------------------------------------------------------------------------- /layouts/partials/post_list.html: -------------------------------------------------------------------------------- 1 | {{ $paginator := .Paginate (where .Site.RegularPages "Section" "post") }} 2 |
3 | {{ range $paginator.Pages }} 4 |
5 |
6 |

7 | 10 |

11 | 18 |
19 |
20 | {{ .Summary }} 21 |
22 | {{ if .Truncated }} 23 |
24 | 25 | {{ i18n "ReadMore" }} » 26 | 27 |
28 | {{ end }} 29 |
30 |
31 | {{end}} 32 |
33 | {{ partial "pagination.html" . }} 34 | 35 | -------------------------------------------------------------------------------- /layouts/partials/post_simple_list.html: -------------------------------------------------------------------------------- 1 | {{ range .Pages }} 2 |
3 |
4 |

5 | 8 |

9 | 10 | 17 |
18 |
19 | {{end}} -------------------------------------------------------------------------------- /layouts/partials/sidebar.html: -------------------------------------------------------------------------------- 1 | 8 | 32 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/author.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/link.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.Links }} 2 | 15 | {{ end }} 16 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/rss.html: -------------------------------------------------------------------------------- 1 | {{ with .OutputFormats.Get "RSS" }} 2 | 8 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/sidebar/social.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.Socials }} 2 | 12 | {{ end}} 13 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/state.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/stats.html: -------------------------------------------------------------------------------- 1 | {{ if (isset .Site.Params.Others "revolvermapid") }} 2 | 5 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/sidebar/tagcloud.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.TagsCloud.Enable }} 2 |
3 |
4 | 5 | {{ i18n "TagCloud" }} 6 |
7 | 16 |
17 | {{ end }} 18 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/toc.html: -------------------------------------------------------------------------------- 1 | {{ if isset .Params "toc"}} 2 |
3 |
4 |
{{ .TableOfContents }}
5 |
6 |
7 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/sub_menu.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /layouts/partials/widgets/comment.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.Comment.Enable }} 2 | 3 | {{ if eq .Site.Params.Comment.Module "Valine" }} 4 |
5 | {{ end }} 6 | 7 | {{ if eq .Site.Params.Comment.Module "Waline" }} 8 |
9 | {{ end }} 10 | 11 | {{ if eq .Site.Params.Comment.Module "LiveRe" }} 12 |
13 | {{ end }} 14 | 15 | {{ if eq .Site.Params.Comment.Module "Utterances" }} 16 |
17 | {{ end }} 18 | 19 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widgets/copyright.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
{{ i18n "ScanQQCode" }}
6 |
7 |
8 |

9 | {{ i18n "ArticleTitle" }}:{{ .Page.Title }} 10 |

11 |

12 | {{ i18n "ArticleLink" }}:{{ .Page.Permalink }} 13 |

14 |

15 | {{ i18n "ArticleAuthor" }}:{{ .Site.Params.AuthorName }} 16 |

17 | {{ $declContent := .Site.Params.ArticleDeclContent }} 18 | {{ if not $declContent }} 19 | {{ $declContent = i18n "ArticleDeclContent" }} 20 | {{ end }} 21 |

22 | {{ i18n "ArticleDeclaration" }}: {{ $declContent | safeHTML }} 23 |

24 |
25 |
26 |
27 |
-------------------------------------------------------------------------------- /layouts/partials/widgets/reward.html: -------------------------------------------------------------------------------- 1 |
2 |
{{ i18n "RewardTips" }}
3 | 6 | 16 |
-------------------------------------------------------------------------------- /layouts/partials/widgets/search.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /layouts/partials/widgets/share.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.Share.Enable }} 2 | 3 | {{ if isset .Site.Params.Share "addthisid" }} 4 |
5 | {{ end }} 6 | 7 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/widgets/statis.html: -------------------------------------------------------------------------------- 1 | {{ if isset .Site.Params.Statis "cnnzsiteid" }} 2 | 3 | 4 | 5 | 6 | 7 | 18 | {{ end }} 19 | {{ if .Site.Params.Statis.BusuanziCounter }} 20 | 21 | 22 | 23 | 24 | 25 | 26 | / 27 | 28 | 29 | 30 | 31 | 32 | {{ end }} -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: -------------------------------------------------------------------------------- /layouts/searchindex.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 3 | {{range where .Site.RegularPages "Kind" "page"}} 4 | 5 | {{ .Title }} 6 | {{ .Permalink }} 7 | 8 | {{ range .Params.categories }}{{ . }}{{ end }} 9 | 10 | 11 | {{ range .Params.tags }} 12 | {{ . }} 13 | {{ end }} 14 | 15 | {{ .Content | plainify }} 16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /layouts/section/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}{{ end}} 2 | 3 | {{ define "main_content" }} 4 |
5 | 6 | 7 | {{ i18n "StatsBlogs" (len (where .Site.RegularPages "Section" "post")) | safeHTML }} 8 | 9 | {{ range (.Paginate (.Data.Pages.GroupByDate "2006") 15 ).PageGroups }} 10 |
11 |

{{ .Key }}

12 |
13 | {{ partial "post_simple_list.html" . }} 14 | {{ end }} 15 |
16 | {{ partial "pagination.html" . }} 17 | {{ end }} -------------------------------------------------------------------------------- /layouts/shortcodes/bilibili.html: -------------------------------------------------------------------------------- 1 |
2 | 4 |
5 | -------------------------------------------------------------------------------- /layouts/shortcodes/note.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner | markdownify }} 3 |
-------------------------------------------------------------------------------- /layouts/shortcodes/qc.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner | markdownify }} 3 |
-------------------------------------------------------------------------------- /layouts/taxonomy/category.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}{{ end}} 2 | 3 | {{ define "main_content" }} 4 |
5 |
6 |

{{ .Title }} 7 | {{ i18n "Category" }} 8 |

9 |
10 | {{ range (.Paginate (.Data.Pages.GroupByDate "2006") 15 ).PageGroups }} 11 |
12 |

{{ .Key }}

13 |
14 | {{ partial "post_simple_list.html" . }} 15 | {{ end }} 16 |
17 | {{ partial "pagination.html" . }} 18 | {{ end }} -------------------------------------------------------------------------------- /layouts/taxonomy/tag.html: -------------------------------------------------------------------------------- 1 | {{ define "main_class"}}{{ end}} 2 | 3 | {{ define "main_content" }} 4 |
5 |
6 |

{{ .Title }} 7 | {{ i18n "Tag" }} 8 |

9 |
10 | {{ range (.Paginate (.Data.Pages.GroupByDate "2006") 15 ).PageGroups }} 11 |
12 |

{{ .Key }}

13 |
14 | {{ partial "post_simple_list.html" . }} 15 | {{ end }} 16 |
17 | {{ partial "pagination.html" . }} 18 | {{ end }} -------------------------------------------------------------------------------- /static/css/syntax.css: -------------------------------------------------------------------------------- 1 | /* Background */ .chroma { color: #f8f8f2; background-color: #272822 } 2 | /* Error */ .chroma .err { color: #960050; background-color: #1e0010 } 3 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 4 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } 5 | /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } 6 | /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } 7 | /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } 8 | /* Keyword */ .chroma .k { color: #66d9ef } 9 | /* KeywordConstant */ .chroma .kc { color: #66d9ef } 10 | /* KeywordDeclaration */ .chroma .kd { color: #66d9ef } 11 | /* KeywordNamespace */ .chroma .kn { color: #f92672 } 12 | /* KeywordPseudo */ .chroma .kp { color: #66d9ef } 13 | /* KeywordReserved */ .chroma .kr { color: #66d9ef } 14 | /* KeywordType */ .chroma .kt { color: #66d9ef } 15 | /* NameAttribute */ .chroma .na { color: #a6e22e } 16 | /* NameClass */ .chroma .nc { color: #a6e22e } 17 | /* NameConstant */ .chroma .no { color: #66d9ef } 18 | /* NameDecorator */ .chroma .nd { color: #a6e22e } 19 | /* NameException */ .chroma .ne { color: #a6e22e } 20 | /* NameFunction */ .chroma .nf { color: #a6e22e } 21 | /* NameOther */ .chroma .nx { color: #a6e22e } 22 | /* NameTag */ .chroma .nt { color: #f92672 } 23 | /* Literal */ .chroma .l { color: #ae81ff } 24 | /* LiteralDate */ .chroma .ld { color: #e6db74 } 25 | /* LiteralString */ .chroma .s { color: #e6db74 } 26 | /* LiteralStringAffix */ .chroma .sa { color: #e6db74 } 27 | /* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } 28 | /* LiteralStringChar */ .chroma .sc { color: #e6db74 } 29 | /* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } 30 | /* LiteralStringDoc */ .chroma .sd { color: #e6db74 } 31 | /* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } 32 | /* LiteralStringEscape */ .chroma .se { color: #ae81ff } 33 | /* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } 34 | /* LiteralStringInterpol */ .chroma .si { color: #e6db74 } 35 | /* LiteralStringOther */ .chroma .sx { color: #e6db74 } 36 | /* LiteralStringRegex */ .chroma .sr { color: #e6db74 } 37 | /* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } 38 | /* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } 39 | /* LiteralNumber */ .chroma .m { color: #ae81ff } 40 | /* LiteralNumberBin */ .chroma .mb { color: #ae81ff } 41 | /* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } 42 | /* LiteralNumberHex */ .chroma .mh { color: #ae81ff } 43 | /* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } 44 | /* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } 45 | /* LiteralNumberOct */ .chroma .mo { color: #ae81ff } 46 | /* Operator */ .chroma .o { color: #f92672 } 47 | /* OperatorWord */ .chroma .ow { color: #f92672 } 48 | /* Comment */ .chroma .c { color: #75715e } 49 | /* CommentHashbang */ .chroma .ch { color: #75715e } 50 | /* CommentMultiline */ .chroma .cm { color: #75715e } 51 | /* CommentSingle */ .chroma .c1 { color: #75715e } 52 | /* CommentSpecial */ .chroma .cs { color: #75715e } 53 | /* CommentPreproc */ .chroma .cp { color: #75715e } 54 | /* CommentPreprocFile */ .chroma .cpf { color: #75715e } 55 | /* GenericDeleted */ .chroma .gd { color: #f92672 } 56 | /* GenericEmph */ .chroma .ge { font-style: italic } 57 | /* GenericInserted */ .chroma .gi { color: #a6e22e } 58 | /* GenericStrong */ .chroma .gs { font-weight: bold } 59 | /* GenericSubheading */ .chroma .gu { color: #75715e } 60 | -------------------------------------------------------------------------------- /static/img/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/404.png -------------------------------------------------------------------------------- /static/img/ali-pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/ali-pay.png -------------------------------------------------------------------------------- /static/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/apple-touch-icon.png -------------------------------------------------------------------------------- /static/img/avatar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/avatar.gif -------------------------------------------------------------------------------- /static/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/avatar.png -------------------------------------------------------------------------------- /static/img/cc-by-nc-nd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /static/img/cc-by-nc-sa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /static/img/cc-by-nc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /static/img/cc-by-nd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 81 | 88 | 93 | 97 | 106 | 110 | 111 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /static/img/cc-by-sa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /static/img/cc-by.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /static/img/cc-zero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 38 | 45 | 46 | 47 | 53 | 57 | 63 | 66 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/loading.gif -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/logo.png -------------------------------------------------------------------------------- /static/img/placeholder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/placeholder.gif -------------------------------------------------------------------------------- /static/img/qq_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/qq_qrcode.png -------------------------------------------------------------------------------- /static/img/quote-l.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /static/img/quote-r.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /static/img/searchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/searchicon.png -------------------------------------------------------------------------------- /static/img/wechat-pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elkan1788/hugo-theme-next/5c7cf5589b191c0009ff631f6c19969ffa79e204/static/img/wechat-pay.png -------------------------------------------------------------------------------- /static/js/affix.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: affix.js v3.3.5 3 | * http://getbootstrap.com/javascript/#affix 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // AFFIX CLASS DEFINITION 14 | // ====================== 15 | 16 | var Affix = function (element, options) { 17 | this.options = $.extend({}, Affix.DEFAULTS, options) 18 | 19 | this.$target = $(this.options.target) 20 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 21 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 22 | 23 | this.$element = $(element) 24 | this.affixed = null 25 | this.unpin = null 26 | this.pinnedOffset = null 27 | 28 | this.checkPosition() 29 | } 30 | 31 | Affix.VERSION = '3.3.5' 32 | 33 | Affix.RESET = 'affix affix-top affix-bottom' 34 | 35 | Affix.DEFAULTS = { 36 | offset: 0, 37 | target: window 38 | } 39 | 40 | Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 41 | var scrollTop = this.$target.scrollTop() 42 | var position = this.$element.offset() 43 | var targetHeight = this.$target.height() 44 | 45 | if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 46 | 47 | if (this.affixed == 'bottom') { 48 | if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 49 | return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 50 | } 51 | 52 | var initializing = this.affixed == null 53 | var colliderTop = initializing ? scrollTop : position.top 54 | var colliderHeight = initializing ? targetHeight : height 55 | 56 | if (offsetTop != null && scrollTop <= offsetTop) return 'top' 57 | if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 58 | 59 | return false 60 | } 61 | 62 | Affix.prototype.getPinnedOffset = function () { 63 | if (this.pinnedOffset) return this.pinnedOffset 64 | this.$element.removeClass(Affix.RESET).addClass('affix') 65 | var scrollTop = this.$target.scrollTop() 66 | var position = this.$element.offset() 67 | return (this.pinnedOffset = position.top - scrollTop) 68 | } 69 | 70 | Affix.prototype.checkPositionWithEventLoop = function () { 71 | setTimeout($.proxy(this.checkPosition, this), 1) 72 | } 73 | 74 | Affix.prototype.checkPosition = function () { 75 | if (!this.$element.is(':visible')) return 76 | 77 | var height = this.$element.height() 78 | var offset = this.options.offset 79 | var offsetTop = offset.top 80 | var offsetBottom = offset.bottom 81 | var scrollHeight = Math.max($(document).height(), $(document.body).height()) 82 | 83 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 84 | if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 85 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 86 | 87 | var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 88 | 89 | if (this.affixed != affix) { 90 | if (this.unpin != null) this.$element.css('top', '') 91 | 92 | var affixType = 'affix' + (affix ? '-' + affix : '') 93 | var e = $.Event(affixType + '.bs.affix') 94 | 95 | this.$element.trigger(e) 96 | 97 | if (e.isDefaultPrevented()) return 98 | 99 | this.affixed = affix 100 | this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 101 | 102 | this.$element 103 | .removeClass(Affix.RESET) 104 | .addClass(affixType) 105 | .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 106 | } 107 | 108 | if (affix == 'bottom') { 109 | this.$element.offset({ 110 | top: scrollHeight - height - offsetBottom 111 | }) 112 | } 113 | } 114 | 115 | 116 | // AFFIX PLUGIN DEFINITION 117 | // ======================= 118 | 119 | function Plugin(option) { 120 | return this.each(function () { 121 | var $this = $(this) 122 | var data = $this.data('bs.affix') 123 | var options = typeof option == 'object' && option 124 | 125 | if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 126 | if (typeof option == 'string') data[option]() 127 | }) 128 | } 129 | 130 | var old = $.fn.affix 131 | 132 | $.fn.affix = Plugin 133 | $.fn.affix.Constructor = Affix 134 | 135 | 136 | // AFFIX NO CONFLICT 137 | // ================= 138 | 139 | $.fn.affix.noConflict = function () { 140 | $.fn.affix = old 141 | return this 142 | } 143 | 144 | 145 | // AFFIX DATA-API 146 | // ============== 147 | 148 | $(window).on('load', function () { 149 | $('[data-spy="affix"]').each(function () { 150 | var $spy = $(this) 151 | var data = $spy.data() 152 | 153 | data.offset = data.offset || {} 154 | 155 | if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 156 | if (data.offsetTop != null) data.offset.top = data.offsetTop 157 | 158 | Plugin.call($spy, data) 159 | }) 160 | }) 161 | 162 | }(jQuery); 163 | -------------------------------------------------------------------------------- /static/js/scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: scrollspy.js v3.3.2 3 | * http://getbootstrap.com/javascript/#scrollspy 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | /** 10 | * Custom by iissnan 11 | * 12 | * - Add a `clear.bs.scrollspy` event. 13 | * - Esacpe targets selector. 14 | */ 15 | 16 | 17 | +function ($) { 18 | 'use strict'; 19 | 20 | // SCROLLSPY CLASS DEFINITION 21 | // ========================== 22 | 23 | function ScrollSpy(element, options) { 24 | this.$body = $(document.body) 25 | this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 26 | this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 27 | this.selector = (this.options.target || '') + ' .nav li > a' 28 | this.offsets = [] 29 | this.targets = [] 30 | this.activeTarget = null 31 | this.scrollHeight = 0 32 | 33 | this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 34 | this.refresh() 35 | this.process() 36 | } 37 | 38 | ScrollSpy.VERSION = '3.3.2' 39 | 40 | ScrollSpy.DEFAULTS = { 41 | offset: 10 42 | } 43 | 44 | ScrollSpy.prototype.getScrollHeight = function () { 45 | return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 46 | } 47 | 48 | ScrollSpy.prototype.refresh = function () { 49 | var that = this 50 | var offsetMethod = 'offset' 51 | var offsetBase = 0 52 | 53 | this.offsets = [] 54 | this.targets = [] 55 | this.scrollHeight = this.getScrollHeight() 56 | 57 | if (!$.isWindow(this.$scrollElement[0])) { 58 | offsetMethod = 'position' 59 | offsetBase = this.$scrollElement.scrollTop() 60 | } 61 | 62 | this.$body 63 | .find(this.selector) 64 | .map(function () { 65 | var $el = $(this) 66 | var href = $el.data('target') || $el.attr('href') 67 | var $href = /^#./.test(href) && $(NexT.utils.escapeSelector(href)) // Need to escape selector. 68 | 69 | return ($href 70 | && $href.length 71 | && $href.is(':visible') 72 | && [[$href[offsetMethod]().top + offsetBase, href]]) || null 73 | }) 74 | .sort(function (a, b) { return a[0] - b[0] }) 75 | .each(function () { 76 | that.offsets.push(this[0]) 77 | that.targets.push(this[1]) 78 | }) 79 | 80 | 81 | } 82 | 83 | ScrollSpy.prototype.process = function () { 84 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 85 | var scrollHeight = this.getScrollHeight() 86 | var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 87 | var offsets = this.offsets 88 | var targets = this.targets 89 | var activeTarget = this.activeTarget 90 | var i 91 | 92 | if (this.scrollHeight != scrollHeight) { 93 | this.refresh() 94 | } 95 | 96 | if (scrollTop >= maxScroll) { 97 | return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 98 | } 99 | 100 | if (activeTarget && scrollTop < offsets[0]) { 101 | $(this.selector).trigger('clear.bs.scrollspy') // Add a custom event. 102 | this.activeTarget = null 103 | return this.clear() 104 | } 105 | 106 | for (i = offsets.length; i--;) { 107 | activeTarget != targets[i] 108 | && scrollTop >= offsets[i] 109 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 110 | && this.activate(targets[i]) 111 | } 112 | } 113 | 114 | ScrollSpy.prototype.activate = function (target) { 115 | this.activeTarget = target 116 | 117 | this.clear() 118 | 119 | var selector = this.selector + 120 | '[data-target="' + target + '"],' + 121 | this.selector + '[href="' + target + '"]' 122 | 123 | var active = $(selector) 124 | .parents('li') 125 | .addClass('active') 126 | 127 | if (active.parent('.dropdown-menu').length) { 128 | active = active 129 | .closest('li.dropdown') 130 | .addClass('active') 131 | } 132 | 133 | active.trigger('activate.bs.scrollspy') 134 | } 135 | 136 | ScrollSpy.prototype.clear = function () { 137 | $(this.selector) 138 | .parentsUntil(this.options.target, '.active') 139 | .removeClass('active') 140 | } 141 | 142 | 143 | // SCROLLSPY PLUGIN DEFINITION 144 | // =========================== 145 | 146 | function Plugin(option) { 147 | return this.each(function () { 148 | var $this = $(this) 149 | var data = $this.data('bs.scrollspy') 150 | var options = typeof option == 'object' && option 151 | 152 | if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 153 | if (typeof option == 'string') data[option]() 154 | }) 155 | } 156 | 157 | var old = $.fn.scrollspy 158 | 159 | $.fn.scrollspy = Plugin 160 | $.fn.scrollspy.Constructor = ScrollSpy 161 | 162 | 163 | // SCROLLSPY NO CONFLICT 164 | // ===================== 165 | 166 | $.fn.scrollspy.noConflict = function () { 167 | $.fn.scrollspy = old 168 | return this 169 | } 170 | 171 | 172 | // SCROLLSPY DATA-API 173 | // ================== 174 | 175 | $(window).on('load.bs.scrollspy.data-api', function () { 176 | $('[data-spy="scroll"]').each(function () { 177 | var $spy = $(this) 178 | Plugin.call($spy, $spy.data()) 179 | }) 180 | }) 181 | 182 | }(jQuery); 183 | -------------------------------------------------------------------------------- /static/js/search.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | // Popup Window; 3 | var isfetched = false; 4 | // Search DB path; 5 | // TO-DO Seems not found best way 6 | var pre_sch_path = window.location.href.indexOf('/en/') > -1 ? '/en/' : "/" 7 | var search_path = "searchindex.xml"; 8 | var path = pre_sch_path + search_path; 9 | // monitor main search box; 10 | function proceedsearch() { 11 | $("body").append('
').css('overflow', 'hide'); 12 | $('.popup').fadeIn('slow'); 13 | } 14 | // search function; 15 | var searchFunc = function(path, search_id, content_id) { 16 | 'use strict'; 17 | $.ajax({ 18 | url: path, 19 | dataType: "text", 20 | async: true, 21 | success: function( xmlResponse ) { 22 | // get the contents from search data 23 | isfetched = true; 24 | $('.popup').detach().appendTo('.header-inner'); 25 | var datas = $( "entry", xmlResponse ).map(function() { 26 | return { 27 | title: $( "title", this ).text(), 28 | content: $("content",this).text(), 29 | url: $( "url" , this).text() 30 | }; 31 | }).get(); 32 | var $input = document.getElementById(search_id); 33 | var $resultContent = document.getElementById(content_id); 34 | $input.addEventListener('input', function(){ 35 | var matchcounts = 0; 36 | var str='
    '; 37 | var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/); 38 | $resultContent.innerHTML = ""; 39 | if (this.value.trim().length > 1) { 40 | // perform local searching 41 | datas.forEach(function(data) { 42 | var isMatch = true; 43 | var content_index = []; 44 | var data_title = data.title.trim().toLowerCase(); 45 | var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase(); 46 | var data_url = data.url; 47 | var index_title = -1; 48 | var index_content = -1; 49 | var first_occur = -1; 50 | // only match artiles with not empty titles and contents 51 | if(data_title != '' && data_content != '') { 52 | keywords.forEach(function(keyword, i) { 53 | index_title = data_title.indexOf(keyword); 54 | index_content = data_content.indexOf(keyword); 55 | if( index_title < 0 && index_content < 0 ){ 56 | isMatch = false; 57 | } else { 58 | if (index_content < 0) { 59 | index_content = 0; 60 | } 61 | if (i == 0) { 62 | first_occur = index_content; 63 | } 64 | } 65 | }); 66 | } 67 | // show search results 68 | if (isMatch) { 69 | matchcounts += 1; 70 | keywords.forEach(function(keyword){ 71 | var regS = new RegExp(keyword, "gi"); 72 | data_title = data_title.replace(regS, "" + keyword + ""); 73 | }); 74 | str += "
  • "+ data_title +""; 75 | var content = data.content.trim().replace(/<[^>]+>/g,""); 76 | if (first_occur >= 0) { 77 | // cut out 100 characters 78 | var start = first_occur - 20; 79 | var end = first_occur + 80; 80 | if(start < 0){ 81 | start = 0; 82 | } 83 | if(start == 0){ 84 | end = 50; 85 | } 86 | if(end > content.length){ 87 | end = content.length; 88 | } 89 | var match_content = content.substring(start, end); 90 | // highlight all keywords 91 | keywords.forEach(function(keyword){ 92 | var regS = new RegExp(keyword, "gi"); 93 | match_content = match_content.replace(regS, ""+keyword+""); 94 | }); 95 | 96 | str += "

    " + match_content +"...

    " 97 | } 98 | str += "
  • "; 99 | } 100 | })}; 101 | str += "
"; 102 | 103 | var rs_cnt = "
"+matchcounts 104 | if (pre_sch_path == '/') { 105 | rs_cnt += " 个结果被找到!" 106 | } else { 107 | rs_cnt += " results found!" 108 | 109 | } 110 | rs_cnt += "

" 111 | str = rs_cnt + str 112 | 113 | if (matchcounts == 0) { str = '
' } 114 | if (keywords == "") { str = '
' } 115 | 116 | $resultContent.innerHTML = str; 117 | }); 118 | proceedsearch(); 119 | } 120 | }); 121 | } 122 | 123 | // handle and trigger popup window; 124 | $('.popup-trigger').click(function(e) { 125 | e.stopPropagation(); 126 | //TODO why here need timeout, couldn't understand it. 127 | setTimeout(() => $('#local-search-input').focus(), 500); 128 | 129 | if (isfetched == false) { 130 | searchFunc(path, 'local-search-input', 'local-search-result'); 131 | } else { 132 | proceedsearch(); 133 | }; 134 | }); 135 | 136 | $('.popup-btn-close').click(function(e){ 137 | $('.popup').fadeOut('slow'); 138 | $(".popoverlay").remove(); 139 | $('body').css('overflow', ''); 140 | }); 141 | 142 | $('.popup').click(function(e){ 143 | e.stopPropagation(); 144 | }); 145 | }); -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "NexT" 2 | license = "MIT" 3 | licenselink = "https://github.com/elkan1788/hugo-theme-next/blob/main/LICENSE" 4 | description = "A personal blog site theme." 5 | homepage = "https://lisenhui.cn" 6 | tags = ["Blog", "Simple", "Dark", "Personal", "Fast", "Theme"] 7 | features = ["some", "awesome", "features"] 8 | min_version = "0.59.1" 9 | demosite = "https://lisenhui.cn" 10 | 11 | [author] 12 | name = "elkan" 13 | homepage = "https://lisenhui.cn" 14 | 15 | [original] 16 | author = "xtfly" 17 | homepage = "http://lanlingzi.cn/" 18 | repo = "https://github.com/xtfly/hugo-theme-next.git" --------------------------------------------------------------------------------