diff --git a/README.md b/README.md index 6f8cea4..235978c 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/README.zh.md b/README.zh.md index ea54e6b..afca5fd 100644 --- a/README.zh.md +++ b/README.zh.md @@ -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) 镜像速度更快,也更稳定。 diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 0074bb3..5845078 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -153,7 +153,6 @@ menus: pageref: /post/math-formula.html weight: 2 parent: example - parent: example - identifier: syntax name: 语法高亮 pageref: /post/syntax-highlighting.html diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..adb9c65 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/hugo-next/hugo-theme-next/v4 + +go 1.11 diff --git a/hugo-theme-next.go b/hugo-theme-next.go new file mode 100644 index 0000000..31341b5 --- /dev/null +++ b/hugo-theme-next.go @@ -0,0 +1 @@ +package hugothemenext diff --git a/static/imgs/hugo_next_logo.png b/static/imgs/hugo_next_logo.png index 9d30f39..2dc7b9d 100644 Binary files a/static/imgs/hugo_next_logo.png and b/static/imgs/hugo_next_logo.png differ diff --git a/static/imgs/img-lazy-loading.gif b/static/imgs/img-lazy-loading.gif index a20f93b..407c65d 100644 Binary files a/static/imgs/img-lazy-loading.gif and b/static/imgs/img-lazy-loading.gif differ