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

@@ -53,6 +53,16 @@ $ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
Or use `Hugo module` to lead into the theme, see below commands:
```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
```
### 💻 Preview on Local
```shell
@@ -74,6 +84,13 @@ $ cd hugo-next-exmaple
$ git submodule update --remote
```
Execute command as below if you are using `Hugo module`:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
## 📝 New Post
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post: