Skip to content

Commit 064c109

Browse files
committed
fix: rare bug causing site_footer.html error
1 parent 888ffd6 commit 064c109

7 files changed

Lines changed: 50 additions & 18 deletions

File tree

modules/blox-tailwind/layouts/_partials/site_footer.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@
3636
{{- $h := md5 $seed -}}
3737
{{- $digits := replaceRE "[^0-9]" "" $h -}}
3838
{{- if lt (len $digits) 6 }}{{- $digits = printf "%s123456" $digits -}}{{- end -}}
39-
{{- $n := int (substr $digits 0 6) -}}
39+
{{- $first6 := substr $digits 0 6 -}}
40+
{{/* Fix for Hugo's int() function treating leading zeros as octal numbers.
41+
Strings like "095186" fail because 8 and 9 aren't valid octal digits.
42+
Replace leading zero with 1 to ensure valid decimal parsing. */}}
43+
{{- if eq (substr $first6 0 1) "0" -}}
44+
{{- $first6 = printf "1%s" (substr $first6 1 5) -}}
45+
{{- end -}}
46+
{{- $n := int $first6 -}}
4047

4148
{{- $brandText := index $brandOptions (mod $n (len $brandOptions)) -}}
4249
{{- $ctaText := cond (ne $tid "")

starters/academic-cv/netlify.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[build]
22
command = """
33
set -e
4-
echo "=== Starting Academic CV build process ==="
4+
echo "=== Starting Blog build process ==="
55
echo "Node version: $(node --version)"
66
echo "pnpm version: $(pnpm --version)"
77
echo "Hugo version: $(hugo version)"
8+
echo "Go version: $(go version || echo 'Go not available')"
89
910
echo "=== Installing dependencies ==="
1011
pnpm install --verbose
1112
1213
echo "=== Running Hugo build ==="
13-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
1415
1516
echo "=== Running Pagefind indexing ==="
1617
pnpm dlx pagefind --source 'public' --verbose
@@ -21,7 +22,8 @@
2122

2223
[build.environment]
2324
HUGO_VERSION = "0.149.1"
24-
NODE_VERSION = "20.0.0"
25+
GO_VERSION = "1.21.5"
26+
NODE_VERSION = "22"
2527
HUGO_ENABLEGITINFO = "true"
2628
HUGO_LOG_I18N_WARNINGS = "true"
2729
HUGO_LOG_WARNINGS = "true"

starters/blog/netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
pnpm install --verbose
1212
1313
echo "=== Running Hugo build ==="
14-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
1515
1616
echo "=== Running Pagefind indexing ==="
1717
pnpm dlx pagefind --source 'public' --verbose
@@ -23,7 +23,7 @@
2323
[build.environment]
2424
HUGO_VERSION = "0.149.1"
2525
GO_VERSION = "1.21.5"
26-
NODE_VERSION = "20.0.0"
26+
NODE_VERSION = "22"
2727
HUGO_ENABLEGITINFO = "true"
2828
HUGO_LOG_I18N_WARNINGS = "true"
2929
HUGO_LOG_WARNINGS = "true"

starters/documentation/netlify.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[build]
22
command = """
33
set -e
4-
echo "=== Starting Documentation build process ==="
4+
echo "=== Starting Blog build process ==="
55
echo "Node version: $(node --version)"
66
echo "pnpm version: $(pnpm --version)"
77
echo "Hugo version: $(hugo version)"
8+
echo "Go version: $(go version || echo 'Go not available')"
89
910
echo "=== Installing dependencies ==="
1011
pnpm install --verbose
1112
1213
echo "=== Running Hugo build ==="
13-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
1415
1516
echo "=== Running Pagefind indexing ==="
1617
pnpm dlx pagefind --source 'public' --verbose
@@ -21,7 +22,8 @@
2122

2223
[build.environment]
2324
HUGO_VERSION = "0.149.1"
24-
NODE_VERSION = "20.0.0"
25+
GO_VERSION = "1.21.5"
26+
NODE_VERSION = "22"
2527
HUGO_ENABLEGITINFO = "true"
2628
HUGO_LOG_I18N_WARNINGS = "true"
2729
HUGO_LOG_WARNINGS = "true"

starters/landing-page/netlify.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
[build]
22
command = """
33
set -e
4-
echo "=== Starting Landing Page build process ==="
4+
echo "=== Starting Blog build process ==="
55
echo "Node version: $(node --version)"
66
echo "pnpm version: $(pnpm --version)"
77
echo "Hugo version: $(hugo version)"
8+
echo "Go version: $(go version || echo 'Go not available')"
89
910
echo "=== Installing dependencies ==="
1011
pnpm install --verbose
1112
1213
echo "=== Running Hugo build ==="
13-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
15+
16+
echo "=== Running Pagefind indexing ==="
17+
pnpm dlx pagefind --source 'public' --verbose
1418
1519
echo "=== Build completed successfully ==="
1620
"""
1721
publish = "public"
1822

1923
[build.environment]
2024
HUGO_VERSION = "0.149.1"
21-
NODE_VERSION = "20.0.0"
25+
GO_VERSION = "1.21.5"
26+
NODE_VERSION = "22"
2227
HUGO_ENABLEGITINFO = "true"
2328
HUGO_LOG_I18N_WARNINGS = "true"
2429
HUGO_LOG_WARNINGS = "true"
@@ -35,6 +40,7 @@
3540
echo "Deploy URL: $DEPLOY_PRIME_URL"
3641
pnpm install --verbose
3742
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
43+
pnpm dlx pagefind --source 'public' --verbose
3844
"""
3945

4046
[context.branch-deploy]
@@ -44,6 +50,7 @@
4450
echo "Deploy URL: $DEPLOY_PRIME_URL"
4551
pnpm install --verbose
4652
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
53+
pnpm dlx pagefind --source 'public' --verbose
4754
"""
4855

4956
[[plugins]]

starters/link-in-bio/netlify.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
[build]
22
command = """
33
set -e
4-
echo "=== Starting Link-in-Bio build process ==="
4+
echo "=== Starting Blog build process ==="
55
echo "Node version: $(node --version)"
66
echo "pnpm version: $(pnpm --version)"
77
echo "Hugo version: $(hugo version)"
8+
echo "Go version: $(go version || echo 'Go not available')"
89
910
echo "=== Installing dependencies ==="
1011
pnpm install --verbose
1112
1213
echo "=== Running Hugo build ==="
13-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
15+
16+
echo "=== Running Pagefind indexing ==="
17+
pnpm dlx pagefind --source 'public' --verbose
1418
1519
echo "=== Build completed successfully ==="
1620
"""
1721
publish = "public"
1822

1923
[build.environment]
2024
HUGO_VERSION = "0.149.1"
21-
NODE_VERSION = "20.0.0"
25+
GO_VERSION = "1.21.5"
26+
NODE_VERSION = "22"
2227
HUGO_ENABLEGITINFO = "true"
2328
HUGO_LOG_I18N_WARNINGS = "true"
2429
HUGO_LOG_WARNINGS = "true"
@@ -35,6 +40,7 @@
3540
echo "Deploy URL: $DEPLOY_PRIME_URL"
3641
pnpm install --verbose
3742
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
43+
pnpm dlx pagefind --source 'public' --verbose
3844
"""
3945

4046
[context.branch-deploy]
@@ -44,6 +50,7 @@
4450
echo "Deploy URL: $DEPLOY_PRIME_URL"
4551
pnpm install --verbose
4652
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
53+
pnpm dlx pagefind --source 'public' --verbose
4754
"""
4855

4956
[[plugins]]

starters/resume/netlify.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
[build]
22
command = """
33
set -e
4-
echo "=== Starting Resume build process ==="
4+
echo "=== Starting Blog build process ==="
55
echo "Node version: $(node --version)"
66
echo "pnpm version: $(pnpm --version)"
77
echo "Hugo version: $(hugo version)"
8+
echo "Go version: $(go version || echo 'Go not available')"
89
910
echo "=== Installing dependencies ==="
1011
pnpm install --verbose
1112
1213
echo "=== Running Hugo build ==="
13-
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
14+
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
15+
16+
echo "=== Running Pagefind indexing ==="
17+
pnpm dlx pagefind --source 'public' --verbose
1418
1519
echo "=== Build completed successfully ==="
1620
"""
1721
publish = "public"
1822

1923
[build.environment]
2024
HUGO_VERSION = "0.149.1"
21-
NODE_VERSION = "20.0.0"
25+
GO_VERSION = "1.21.5"
26+
NODE_VERSION = "22"
2227
HUGO_ENABLEGITINFO = "true"
2328
HUGO_LOG_I18N_WARNINGS = "true"
2429
HUGO_LOG_WARNINGS = "true"
@@ -35,6 +40,7 @@
3540
echo "Deploy URL: $DEPLOY_PRIME_URL"
3641
pnpm install --verbose
3742
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
43+
pnpm dlx pagefind --source 'public' --verbose
3844
"""
3945

4046
[context.branch-deploy]
@@ -44,6 +50,7 @@
4450
echo "Deploy URL: $DEPLOY_PRIME_URL"
4551
pnpm install --verbose
4652
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
53+
pnpm dlx pagefind --source 'public' --verbose
4754
"""
4855

4956
[[plugins]]

0 commit comments

Comments
 (0)