From 1fc626c0935cd5636970f2a76728244dccae4fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E5=9D=82=E9=9B=85?= <23130178+ShadowRZ@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:30:15 +0800 Subject: [PATCH] Switch to Hugo Modules --- .gitmodules | 3 --- go.mod | 7 +++++++ go.sum | 2 ++ config.yaml => hugo.yaml | 6 +++++- themes/stack | 1 - 5 files changed, 14 insertions(+), 5 deletions(-) delete mode 100644 .gitmodules create mode 100644 go.mod create mode 100644 go.sum rename config.yaml => hugo.yaml (98%) delete mode 160000 themes/stack diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6814fcc..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "themes/stack"] - path = themes/stack - url = https://github.com/CaiJimmy/hugo-theme-stack diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b02bd53 --- /dev/null +++ b/go.mod @@ -0,0 +1,7 @@ +module github.com/ShadowRZ/blog + +go 1.21.0 + +require ( + github.com/CaiJimmy/hugo-theme-stack/v3 v3.20.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..8cc292c --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/CaiJimmy/hugo-theme-stack/v3 v3.20.0 h1:HcDBhvXj1GJtFEN3lqkmLEULWYu5ycp4KV9v8fQ5s2s= +github.com/CaiJimmy/hugo-theme-stack/v3 v3.20.0/go.mod h1:IPmCXiIxlFSLFYS0tOmYP6ySLviyeNVSabyvSuaxD+I= diff --git a/config.yaml b/hugo.yaml similarity index 98% rename from config.yaml rename to hugo.yaml index 3e11111..3890c85 100644 --- a/config.yaml +++ b/hugo.yaml @@ -1,6 +1,5 @@ baseurl: https://shadowrz.github.io/blog/ languageCode: zh-cn -theme: stack paginate: 20 title: &title "RC0S % Blog" subtitle: &subtitle "A place for Yorusaka Miyabi" @@ -269,3 +268,8 @@ related: - name: categories weight: 200 + +# config.yaml +module: + imports: + - path: github.com/CaiJimmy/hugo-theme-stack/v3 diff --git a/themes/stack b/themes/stack deleted file mode 160000 index 2fb534f..0000000 --- a/themes/stack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2fb534f9a6dbd2edfafa81034d37ba92eec06473