diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 16e1f20d..e381598b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,7 +23,7 @@ updates: - "Lruihao" labels: - "dependencies" - - package-ecosystem: "gitsubmodule" + - package-ecosystem: "gomod" directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/algolia-atomic.yml b/.github/workflows/algolia-atomic.yml index 5495472e..e45cd0c2 100644 --- a/.github/workflows/algolia-atomic.yml +++ b/.github/workflows/algolia-atomic.yml @@ -11,6 +11,8 @@ on: - 'data/**' - 'static/**' - 'themes/**' + - 'go.mod' + - 'go.sum' workflow_dispatch: jobs: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 424e9eff..00000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "themes/FixIt"] - path = themes/FixIt - url = https://github.com/hugo-fixit/FixIt.git -[submodule "themes/shortcode-sponsor-log"] - path = themes/shortcode-sponsor-log - url = https://github.com/Lruihao/hugo-shortcode-sponsor-log.git diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 06c24f49..f8a2846c 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -13,7 +13,7 @@ baseURL = "http://localhost:1313" # theme # 主题 -theme = ["FixIt", "shortcode-sponsor-log"] +# theme = ["FixIt", "shortcode-sponsor-log"] # determines default content language ["en", "zh-cn", "fr", "pl", ...] # 设置默认的语言 ["en", "zh-cn", "fr", "pl", ...] diff --git a/config/_default/module.toml b/config/_default/module.toml index 44947bad..a70d90e2 100644 --- a/config/_default/module.toml +++ b/config/_default/module.toml @@ -4,15 +4,13 @@ # ------------------------------------------------------------------------------------- # equivalent to `env HUGO_MODULE_REPLACEMENTS="github.com/hugo-fixit/FixIt -> FixIt"` -# If you want to update the theme, comment out the next line, then run `hugo mod get -u`, then uncomment it. -# sed -i '' '9s/^/# /' config/_default/module.toml && hugo mod get -u github.com/hugo-fixit/FixIt@master && hugo mod tidy && sed -i '' '9s/^# //' config/_default/module.toml # replacements = "github.com/hugo-fixit/FixIt -> FixIt" -# [[imports]] -# path = "github.com/hugo-fixit/FixIt" +[[imports]] + path = "github.com/hugo-fixit/FixIt" -# [[imports]] -# path = "github.com/Lruihao/hugo-shortcode-sponsor-log" +[[imports]] + path = "github.com/Lruihao/hugo-shortcode-sponsor-log" [hugoVersion] extended = true diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..9dd48370 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/hugo-fixit/docs + +go 1.19 + +require ( + github.com/Lruihao/hugo-shortcode-sponsor-log v1.0.0 // indirect + github.com/hugo-fixit/FixIt v0.3.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..e1e892c7 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/Lruihao/hugo-shortcode-sponsor-log v1.0.0 h1:HN1tKv3xYVZRSz+xt2Wr3hLbqxi5yK6OZRecYj22yyU= +github.com/Lruihao/hugo-shortcode-sponsor-log v1.0.0/go.mod h1:B0v1x6BWWp5g6w82hBfZkJNPTyTw8Cvt6ccZ7BllA20= +github.com/hugo-fixit/FixIt v0.3.1 h1:5/ufyAp+SmMfDHOdvP5WtkfcVik30wz1iO5/STNqJyk= +github.com/hugo-fixit/FixIt v0.3.1/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= diff --git a/package.json b/package.json index 7ece8c4c..b59789af 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "prepare": "husky install", "build": "hugo -v --gc --minify", "server": "hugo server -D --disableFastRender --navigateToChanged --ignoreCache --bind 0.0.0.0", - "server:production": "npm run server -- -e production" + "server:production": "npm run server -- -e production", + "update:theme": "hugo mod get -u github.com/hugo-fixit/FixIt@latest && hugo mod tidy" }, "devDependencies": { "atomic-algolia": "^0.3.19", diff --git a/themes/FixIt b/themes/FixIt deleted file mode 160000 index 594c89eb..00000000 --- a/themes/FixIt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 594c89eb1eb18c6777424b6e4f1e65486b3dee59 diff --git a/themes/shortcode-sponsor-log b/themes/shortcode-sponsor-log deleted file mode 160000 index 09bc7139..00000000 --- a/themes/shortcode-sponsor-log +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 09bc713901228bd185db35b5066f04f8073adc42