Skip to content

Commit

Permalink
Chore: 使用环境变量 HUGO_VERSION 控制 Hugo 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Dec 17, 2024
1 parent 2c04eeb commit bc287f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/algolia-atomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
hugo-version: ${{ vars.HUGO_VERSION || 'latest' }}
extended: true

- name: Build
Expand Down
5 changes: 3 additions & 2 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,9 @@ disableThemeInject = false
# Compatibility config
# 兼容性设置
[compatibility]
# whether to use Polyfill.io to be compatible with older browsers
# 是否使用 Polyfill.io 来兼容旧式浏览器
# whether to use Polyfill.io on cdnjs to be compatible with older browsers
# 是否使用 cdnjs 上的 Polyfill.io 来兼容旧式浏览器
# https://cdnjs.cloudflare.com/polyfill
polyfill = false
# whether to use object-fit-images to be compatible with older browsers
# 是否使用 object-fit-images 来兼容旧式浏览器
Expand Down
3 changes: 2 additions & 1 deletion content/en/guides/algolia-atomic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ One more thing, you can automate the process of uploading `search.json` to algol
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
# use the environment variable HUGO_VERSION as the hugo version, if not set, use `latest`.
hugo-version: ${{ vars.HUGO_VERSION || 'latest' }}
extended: true

- name: Build
Expand Down
3 changes: 2 additions & 1 deletion content/zh-cn/guides/algolia-atomic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ One more thing,你可以使用 [GitHub Actions](https://github.com/features/ac
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
# use the environment variable HUGO_VERSION as the hugo version, if not set, use `latest`.
hugo-version: ${{ vars.HUGO_VERSION || 'latest' }}
extended: true

- name: Build
Expand Down

0 comments on commit bc287f1

Please sign in to comment.