Skip to content

Commit a1c3e9e

Browse files
authored
feat: support Hugo from v0.146.0 to the latest version (#1012)
* feat: support Hugo from v0.146.0 to the latest version * chore: update ci * fix: update CI badge to reflect Hugo build validation
1 parent 0349869 commit a1c3e9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+195
-431
lines changed

.circleci/config.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Hugo build (multi-version) + HTML validate
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-and-validate:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
hugo_version: [ "0.146.0", "0.156.0" ]
18+
hugo_extended: [ true ]
19+
hugo_env: [ development, production ]
20+
env:
21+
HUGO_ENV: ${{ matrix.hugo_env }}
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Checkout submodules
30+
run: git submodule update --init --recursive
31+
32+
- name: Setup Hugo
33+
uses: peaceiris/actions-hugo@v3
34+
with:
35+
hugo-version: ${{ matrix.hugo_version }}
36+
extended: ${{ matrix.hugo_extended }}
37+
38+
- name: Build site
39+
run: |
40+
hugo --source exampleSite --gc --minify
41+
42+
- name: Setup Ruby
43+
uses: ruby/setup-ruby@v1
44+
with:
45+
ruby-version: "3.3"
46+
bundler-cache: true
47+
48+
- name: Install html-proofer
49+
run: gem install html-proofer
50+
51+
- name: Validate HTML
52+
run: |
53+
htmlproofer exampleSite/public --disable-external --ignore-missing-alt --no-enforce-https

README.md

Lines changed: 2 additions & 2 deletions

README.zh-cn.md

Lines changed: 2 additions & 2 deletions

exampleSite/content/posts/theme-documentation-basics/index.en.md

Lines changed: 29 additions & 31 deletions

exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md

Lines changed: 28 additions & 28 deletions

exampleSite/hugo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
774774
# Permalinks config (https://gohugo.io/content-management/urls/#permalinks)
775775
# Permalinks 配置 (https://gohugo.io/content-management/urls/#permalinks)
776776
[permalinks]
777-
# posts = ":year/:month/:filename"
778-
posts = ":filename"
777+
# posts = ":year/:month/:contentbasename"
778+
posts = ":contentbasename"
779779

780780
# Privacy config (https://gohugo.io/configuration/privacy/)
781781
# 隐私信息配置 (https://gohugo.io/configuration/privacy/)

layouts/_default/_markup/render-codeblock-goat.html renamed to layouts/_markup/render-codeblock-goat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
{{- if $render.goat | default true -}}
44
{{- partial "plugin/goat.html" . -}}
55
{{- else -}}
6-
{{- template "_default/_markup/render-codeblock.html" . -}}
6+
{{- template "_markup/render-codeblock.html" . -}}
77
{{- end -}}

layouts/_default/_markup/render-codeblock-mermaid.html renamed to layouts/_markup/render-codeblock-mermaid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
{{- if $render.mermaid | default true -}}
44
{{- dict "Content" .Inner "Page" .Page | partial "plugin/mermaid.html" -}}
55
{{- else -}}
6-
{{- template "_default/_markup/render-codeblock.html" . -}}
6+
{{- template "_markup/render-codeblock.html" . -}}
77
{{- end -}}
File renamed without changes.

0 commit comments

Comments
 (0)