Support Golang Module

This commit is contained in:
WaterLemons2k
2023-08-19 17:08:37 +08:00
parent e08456419c
commit 39e17d6f68
7 changed files with 38 additions and 1 deletions

View File

@@ -52,6 +52,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
或通过 `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
```
### 💻 本地预览
```shell
@@ -73,6 +83,13 @@ $ cd hugo-next-exmaple
$ git submodule update --remote
```
如使用 `Hugo module`,执行如下命令:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
> **Note**
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。