Skip to content

Commit

Permalink
Chore: 使用 hugo modules 加载主题及组件
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jan 11, 2024
1 parent 4a45aa4 commit d747134
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ updates:
- "Lruihao"
labels:
- "dependencies"
- package-ecosystem: "gitsubmodule"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/algolia-atomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- 'data/**'
- 'static/**'
- 'themes/**'
- 'go.mod'
- 'go.sum'
workflow_dispatch:

jobs:
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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", ...]
Expand Down
10 changes: 4 additions & 6 deletions config/_default/module.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion themes/FixIt
Submodule FixIt deleted from 594c89
1 change: 0 additions & 1 deletion themes/shortcode-sponsor-log
Submodule shortcode-sponsor-log deleted from 09bc71

0 comments on commit d747134

Please sign in to comment.