2022-10-02 11:11:37 +08:00
|
|
|
|
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md)
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
<a title="Hugo NexT 站点" href="https://preview.hugo-next.eu.org">
|
2024-06-10 18:12:07 +08:00
|
|
|
|
<img align="right" alt="NexT logo" width="266" src="images/hugo-next-primary.png">
|
2022-07-03 10:41:28 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
## Hugo NexT
|
|
|
|
|
|
|
|
|
|
«Hugo NexT» 是一款高质量且优雅的 [Hugo](https://gohugo.io) 主题,从原来 `Hexo` 引擎的 [`NexT`](https://github.com/next-theme/hexo-theme-next) 主题中移植过来,继续保留其经典的设计和 4 种不同页面布局模式,一切因 :heart: 重新出发愿你也能喜欢。
|
|
|
|
|
|
|
|
|
|
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
|
|
|
|
|
|
2024-06-10 17:47:31 +08:00
|
|
|
|
[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [](https://github.com/hugo-next/hugo-theme-next/releases) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2024-06-10 18:12:07 +08:00
|
|
|
|

|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 🎨 4 种页面模式
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
* :heart_decoration: 冥想 (Muse)
|
|
|
|
|
* :six_pointed_star: 迷雾 (Mist)
|
|
|
|
|
* :pisces: 双鱼座 (Pisces)
|
|
|
|
|
* :gemini: 双子座 (Gemini) (**默认**)
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 👀 在线预览
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2024-06-10 17:47:31 +08:00
|
|
|
|
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
|
|
|
|
|
| :------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
|
2022-07-03 10:41:28 +08:00
|
|
|
|
| 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) |  |
|
2024-06-10 17:47:31 +08:00
|
|
|
|
| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) |  |
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2022-07-03 22:00:25 +08:00
|
|
|
|
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
|
|
|
|
|
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 👣 快速开始
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git` 和 `Hugo Extened` 两款软件。
|
|
|
|
|
|
|
|
|
|
### 📰 使用模板
|
|
|
|
|
|
|
|
|
|
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
|
|
|
|
|
|
2024-06-10 18:12:07 +08:00
|
|
|
|

|
2022-10-02 11:11:37 +08:00
|
|
|
|
|
|
|
|
|
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
|
|
|
|
|
|
|
|
|
|
### 📐 直接引用
|
|
|
|
|
|
|
|
|
|
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ cd hugo-next-exmaple
|
2022-07-04 09:27:41 +08:00
|
|
|
|
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
|
2022-10-02 11:11:37 +08:00
|
|
|
|
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
|
|
|
|
|
$ mv config.toml config.toml.backup
|
|
|
|
|
```
|
|
|
|
|
|
2023-08-19 17:08:37 +08:00
|
|
|
|
或通过 `Hugo module` 模式引用本主题,参考如下命令:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ cd hugo-next-exmaple
|
|
|
|
|
$ hugo mod init hugo-next-exmaple
|
|
|
|
|
$ wget -O config.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/config.yaml
|
|
|
|
|
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' config.yaml
|
|
|
|
|
$ mv config.toml config.toml.backup
|
|
|
|
|
```
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
### 💻 本地预览
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ cd hugo-next-exmaple
|
2022-07-03 10:41:28 +08:00
|
|
|
|
$ hugo server
|
|
|
|
|
```
|
2022-10-02 11:11:37 +08:00
|
|
|
|
|
2022-07-03 10:41:28 +08:00
|
|
|
|
打开浏览器,在地址栏输入 http://127.0.0.1:1313/ 查看主题效果,祝你好运!:tada::tada::tada:
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
> **Note**
|
|
|
|
|
> 要注意下 `hugo server` 命令只是用于本地开发或写文章时预览,并非是将其直接对外网开放访问。在正式发布时,可通过 `hugo` 命令生成全站静态文件,然后部署到类似 `Nginx` 的 Web 服务器即可。
|
|
|
|
|
|
|
|
|
|
### 🔄 主题更新
|
|
|
|
|
|
2022-07-03 22:00:25 +08:00
|
|
|
|
后续更新主题只需要在你的站点目录中,执行如下命令:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ cd hugo-next-exmaple
|
|
|
|
|
$ git submodule update --remote
|
|
|
|
|
```
|
|
|
|
|
|
2023-08-19 17:08:37 +08:00
|
|
|
|
如使用 `Hugo module`,执行如下命令:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ cd hugo-next-exmaple
|
|
|
|
|
$ hugo mod get -u
|
|
|
|
|
```
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
> **Note**
|
2022-07-03 10:41:28 +08:00
|
|
|
|
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 📝 发表新文章
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
主题已经配置了默认的文章模板,建议使用如下 Hugo 命令快速创建新的文章:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ hugo new posts/hello-world.md
|
|
|
|
|
```
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
> **Note**
|
|
|
|
|
> 其中 `posts` 路径是 `content` 根目录下的子文件夹,可依据自己的文件管理形态调整。
|
|
|
|
|
|
2022-07-04 09:27:41 +08:00
|
|
|
|
关于文章头部那些参数作用的说明参考如下:
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
---
|
|
|
|
|
# 文章标题
|
|
|
|
|
title: "{{ replace .Name "-" " " | title }}"
|
|
|
|
|
# 文章内容摘要
|
|
|
|
|
description: "{{ .Name }}"
|
|
|
|
|
# 文章内容关键字
|
|
|
|
|
keywords: "{{replace .Name "-" ","}}"
|
|
|
|
|
# 发表日期
|
|
|
|
|
date: {{ .Date }}
|
|
|
|
|
# 最后修改日期
|
|
|
|
|
lastmod: {{ .Date }}
|
|
|
|
|
# 分类
|
|
|
|
|
categories:
|
|
|
|
|
-
|
|
|
|
|
# 标签
|
|
|
|
|
tags:
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
# 原文作者
|
|
|
|
|
#author:
|
|
|
|
|
# 原文链接
|
|
|
|
|
#link:
|
|
|
|
|
# 图片链接,用在open graph和twitter卡片上
|
|
|
|
|
#imgs:
|
|
|
|
|
# 在首页展开内容
|
|
|
|
|
#expand: true
|
|
|
|
|
# 外部链接地址,访问时直接跳转
|
|
|
|
|
#extlink:
|
2022-10-30 21:12:01 +08:00
|
|
|
|
# 在当前页面关闭评论功能
|
2022-07-03 10:41:28 +08:00
|
|
|
|
#comment:
|
|
|
|
|
# enable: false
|
2022-10-30 21:12:01 +08:00
|
|
|
|
# 关闭当前页面目录功能
|
|
|
|
|
# 注意:正常情况下文章中有H2-H4标题会自动生成目录,无需额外配置
|
2022-07-03 10:41:28 +08:00
|
|
|
|
#toc: false
|
|
|
|
|
# 绝对访问路径
|
|
|
|
|
#url: "{{ lower .Name }}.html"
|
|
|
|
|
# 开启文章置顶,数字越小越靠前
|
|
|
|
|
#weight: 1
|
2022-10-02 11:11:37 +08:00
|
|
|
|
# 开启数学公式渲染,可选值: mathjax, katex
|
|
|
|
|
#math: mathjax
|
|
|
|
|
# 开启各种图渲染,如流程图、时序图、类图等
|
|
|
|
|
#mermaid: true
|
2022-07-03 10:41:28 +08:00
|
|
|
|
---
|
|
|
|
|
```
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 🎉 用户案例
|
|
|
|
|
|
|
|
|
|
- [Hugo Docs & Demo](https://hugo-next.eu.org/)
|
|
|
|
|
- [凡梦星尘空间站](https://lisenhui.cn/)
|
|
|
|
|
- [阿哈吉](https://a.happy2008.top/)
|
|
|
|
|
- [研究僧](https://yuanlucas.com/)
|
|
|
|
|
- [Zero's Record](https://izeroo.cn/)
|
|
|
|
|
- [更多案例上线](https://hugo-next.eu.org/flinks.html)
|
|
|
|
|
|
|
|
|
|
如你也正在使用 `Hugo NexT` 主题,欢迎在 [flinks.yaml](https://github.com/hugo-next/hugo-next-docs/blob/develop/data/flinks.yaml) 文件底部提交贵站的名称、描述、头像、链接等信息,具体格式内容参考如下:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
- name: NexT 主题
|
|
|
|
|
desc: 保持简单的易用性和强大的功能
|
|
|
|
|
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
|
|
|
|
|
link: https://hugo-next.eu.org
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 🙋 使用反馈
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
- 加入 [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) 或 [Gitter](https://gitter.im/hugo-next/community) 在线讨论 :beers:
|
|
|
|
|
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug:
|
|
|
|
|
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) 表新功能的想法 :sparkles:
|
|
|
|
|
|
2022-07-03 22:00:25 +08:00
|
|
|
|
> 国内用户也可加入 QQ 群交流: 604710815
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 👨👩👧👦 欢迎加入
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 📜 许可证
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
[MIT License](LICENSE)
|
|
|
|
|
|
2022-07-04 09:27:41 +08:00
|
|
|
|
Copyright (c) 2022, hugo-next 团队
|
2022-07-03 22:00:25 +08:00
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
## 💖 致谢
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
|
|
|
|
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
|
|
|
|
|
|
2022-10-02 11:11:37 +08:00
|
|
|
|
以下是打赏名单列表(按时间倒序):
|
2022-07-03 10:41:28 +08:00
|
|
|
|
|
2024-06-10 17:47:31 +08:00
|
|
|
|
| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
|
|
|
|
|
| :--------: | ------ | -------- | -------- | -------------------------------- |
|
|
|
|
|
| 2024.05.11 | *祥 | 支付宝 | ¥66.66 | 感谢创作这么好的主题 |
|
|
|
|
|
| 2023.07.25 | *五 | 微信支付 | ¥50.00 | 很喜欢next主题,感谢,请你喝咖啡 |
|
|
|
|
|
| 2023.06.01 | **霖 | 支付宝 | ¥10.00 | / |
|
|
|
|
|
| 2022.11.15 | f888 | 咸鱼 | ¥6.20 | 聊表心意 |
|
|
|
|
|
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
|
|
|
|
|
| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
|
|
|
|
|
| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
|
|
|
|
|
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
|
|
|
|
|
| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
|
|
|
|
|
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
|
|
|
|
|
|