mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
fix: rare bug causing site_footer.html error
This commit is contained in:
1 parent
888ffd66de
commit
064c109db9
7 files changed
+50
-18
No files matched your search
@@ -36,7 +36,14 @@
|
||||
{{- $h := md5 $seed -}}
|
||||
{{- $digits := replaceRE "[^0-9]" "" $h -}}
|
||||
{{- if lt (len $digits) 6 }}{{- $digits = printf "%s123456" $digits -}}{{- end -}}
|
||||
{{- $n := int (substr $digits 0 6) -}}
|
||||
{{- $first6 := substr $digits 0 6 -}}
|
||||
{{/* Fix for Hugo's int() function treating leading zeros as octal numbers.
|
||||
Strings like "095186" fail because 8 and 9 aren't valid octal digits.
|
||||
Replace leading zero with 1 to ensure valid decimal parsing. */}}
|
||||
{{- if eq (substr $first6 0 1) "0" -}}
|
||||
{{- $first6 = printf "1%s" (substr $first6 1 5) -}}
|
||||
{{- end -}}
|
||||
{{- $n := int $first6 -}}
|
||||
|
||||
{{- $brandText := index $brandOptions (mod $n (len $brandOptions)) -}}
|
||||
{{- $ctaText := cond (ne $tid "")
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[build]
|
||||
command = """
|
||||
set -e
|
||||
echo "=== Starting Academic CV build process ==="
|
||||
echo "=== Starting Blog build process ==="
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Hugo version: $(hugo version)"
|
||||
echo "Go version: $(go version || echo 'Go not available')"
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
@@ -21,7 +22,8 @@
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
NODE_VERSION = "20.0.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
@@ -23,7 +23,7 @@
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "20.0.0"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[build]
|
||||
command = """
|
||||
set -e
|
||||
echo "=== Starting Documentation build process ==="
|
||||
echo "=== Starting Blog build process ==="
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Hugo version: $(hugo version)"
|
||||
echo "Go version: $(go version || echo 'Go not available')"
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
@@ -21,7 +22,8 @@
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
NODE_VERSION = "20.0.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
[build]
|
||||
command = """
|
||||
set -e
|
||||
echo "=== Starting Landing Page build process ==="
|
||||
echo "=== Starting Blog build process ==="
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Hugo version: $(hugo version)"
|
||||
echo "Go version: $(go version || echo 'Go not available')"
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
|
||||
echo "=== Build completed successfully ==="
|
||||
"""
|
||||
@@ -18,7 +22,8 @@
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
NODE_VERSION = "20.0.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
@@ -35,6 +40,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[context.branch-deploy]
|
||||
@@ -44,6 +50,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[[plugins]]
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
[build]
|
||||
command = """
|
||||
set -e
|
||||
echo "=== Starting Link-in-Bio build process ==="
|
||||
echo "=== Starting Blog build process ==="
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Hugo version: $(hugo version)"
|
||||
echo "Go version: $(go version || echo 'Go not available')"
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
|
||||
echo "=== Build completed successfully ==="
|
||||
"""
|
||||
@@ -18,7 +22,8 @@
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
NODE_VERSION = "20.0.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
@@ -35,6 +40,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[context.branch-deploy]
|
||||
@@ -44,6 +50,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[[plugins]]
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
[build]
|
||||
command = """
|
||||
set -e
|
||||
echo "=== Starting Resume build process ==="
|
||||
echo "=== Starting Blog build process ==="
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Hugo version: $(hugo version)"
|
||||
echo "Go version: $(go version || echo 'Go not available')"
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
pnpm install --verbose
|
||||
|
||||
echo "=== Running Hugo build ==="
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings --printUnusedTemplates
|
||||
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
|
||||
echo "=== Running Pagefind indexing ==="
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
|
||||
echo "=== Build completed successfully ==="
|
||||
"""
|
||||
@@ -18,7 +22,8 @@
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.149.1"
|
||||
NODE_VERSION = "20.0.0"
|
||||
GO_VERSION = "1.21.5"
|
||||
NODE_VERSION = "22"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
HUGO_LOG_I18N_WARNINGS = "true"
|
||||
HUGO_LOG_WARNINGS = "true"
|
||||
@@ -35,6 +40,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[context.branch-deploy]
|
||||
@@ -44,6 +50,7 @@
|
||||
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
||||
pnpm install --verbose
|
||||
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
||||
pnpm dlx pagefind --source 'public' --verbose
|
||||
"""
|
||||
|
||||
[[plugins]]
|
||||
|
||||
Reference in new issue
Block a user