File tree Expand file tree Collapse file tree 5 files changed +48
-2
lines changed
Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,26 @@ on: # yamllint disable-line rule:truthy
1010 - main
1111
1212jobs :
13+ validate :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ submodules : recursive
19+ - name : Build site
20+ run : |
21+ docker run --rm \
22+ -v "$PWD":/src \
23+ -w /src \
24+ hugomods/hugo:reg-0.147.9 hugo
25+ - name : Validate pages
26+ run : |
27+ find content -name '*.md' \
28+ -exec printf 'Checking %s\n' {} \; \
29+ -exec ./validate-page.sh {} \;
1330 deploy :
1431 runs-on : ubuntu-latest
32+ needs : validate
1533 steps :
1634 # Run Hugo on the server to build the site
1735 - name : Build Site with Hugo
Original file line number Diff line number Diff line change 1+ ---
2+ name : Validate Site
3+
4+ on :
5+ pull_request :
6+
7+ jobs :
8+ validate :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ with :
13+ submodules : recursive
14+ - name : Build site
15+ run : |
16+ docker run --rm \
17+ -v "$PWD":/src \
18+ -w /src \
19+ hugomods/hugo:reg-0.147.9 hugo
20+ - name : Validate pages
21+ run : |
22+ find content -name '*.md' \
23+ -exec printf 'Checking %s\n' {} \; \
24+ -exec ./validate-page.sh {} \;
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ ignore: |
66
77rules :
88 line-length : disable
9+ truthy : disable
Original file line number Diff line number Diff line change 4343 < meta name ="description " content ="{{ . }} ">
4444{{- end }}
4545{{- with .Site.Params.author.name }}
46- < meta name ="author " content ="{{ . }} "/ >
46+ < meta name ="author " content ="{{ . }} ">
4747{{- end }}
4848{{- partial "seo/main.html" . }}
4949{{- with .Site.Params.favicon }}
Original file line number Diff line number Diff line change @@ -12,8 +12,11 @@ path=$1
1212# Collapse multiple slashes to 1
1313path=$( echo " $path " | sed -E ' s#/+#/#g' )
1414
15+ # Remove replace _index.md paths with the path that will lead to the index.
16+ if [[ $path == * /_index.md ]]; then
17+ path=${path%/ _index.md}
1518# Remove .md from paths.
16- if [[ $path == * .md ]]; then
19+ elif [[ $path == * .md ]]; then
1720 path=${path% .md}
1821fi
1922
You can’t perform that action at this time.
0 commit comments