Skip to content

Commit f506d25

Browse files
committed
Fix errors and validation scripts
1 parent a476aec commit f506d25

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
hugomods/hugo:reg-0.147.9 hugo
2525
- name: Validate pages
2626
run: |
27-
find content -name '*.md' -print0 \
28-
| xargs -0 -n1 ./validate-page.sh
29-
27+
find content -name '*.md' \
28+
-exec printf 'Checking %s\n' {} \; \
29+
-exec ./validate-page.sh {} \;
3030
deploy:
3131
runs-on: ubuntu-latest
3232
needs: validate

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ jobs:
1919
hugomods/hugo:reg-0.147.9 hugo
2020
- name: Validate pages
2121
run: |
22-
find content -name '*.md' -print0 \
23-
| xargs -0 -n1 ./validate-page.sh
22+
find content -name '*.md' \
23+
-exec printf 'Checking %s\n' {} \; \
24+
-exec ./validate-page.sh {} \;

.yamllint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ ignore: |
66
77
rules:
88
line-length: disable
9+
truthy: disable

layouts/partials/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
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 }}

validate-page.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ path=$1
1212
# Collapse multiple slashes to 1
1313
path=$(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}
1821
fi
1922

0 commit comments

Comments
 (0)