From bc287f19b3eefecaf88eef4294cacfb60b08bb8b Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 17 Dec 2024 18:09:38 +0800 Subject: [PATCH] =?UTF-8?q?Chore:=20=E4=BD=BF=E7=94=A8=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=20HUGO=5FVERSION=20=E6=8E=A7=E5=88=B6=20Hugo?= =?UTF-8?q?=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/algolia-atomic.yml | 2 +- config/_default/params.toml | 5 +++-- content/en/guides/algolia-atomic/index.md | 3 ++- content/zh-cn/guides/algolia-atomic/index.md | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/algolia-atomic.yml b/.github/workflows/algolia-atomic.yml index 1bb34ee..170118c 100644 --- a/.github/workflows/algolia-atomic.yml +++ b/.github/workflows/algolia-atomic.yml @@ -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 diff --git a/config/_default/params.toml b/config/_default/params.toml index 57b63b0..52366ad 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -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 来兼容旧式浏览器 diff --git a/content/en/guides/algolia-atomic/index.md b/content/en/guides/algolia-atomic/index.md index 1ac25ad..093cc21 100644 --- a/content/en/guides/algolia-atomic/index.md +++ b/content/en/guides/algolia-atomic/index.md @@ -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 diff --git a/content/zh-cn/guides/algolia-atomic/index.md b/content/zh-cn/guides/algolia-atomic/index.md index 4f107d7..50868d0 100644 --- a/content/zh-cn/guides/algolia-atomic/index.md +++ b/content/zh-cn/guides/algolia-atomic/index.md @@ -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