mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-11 03:12:56 +00:00
Hugo v0.161 dropped the standalone tailwindcss binary; @tailwindcss/cli
npm package is now the only accepted transformer, invoked via
`node --permission` (Node >= 22 required).
- Bump module.hugoVersion.min to 0.161.0 in modules/blox/hugo.yaml;
add comment explaining why security.node.permissions is left to
Hugo's built-in defaults
- Bump hugo_version / HUGO_VERSION / devcontainer image tag to 0.161.0
across all 9 templates (hugoblox.yaml, netlify.toml, devcontainer.json)
- Bump devcontainer base image Node 20 → 22 and default Hugo version
- Add scripts/check-template-deps.mjs to assert every template declares
tailwindcss + @tailwindcss/cli; wire as pnpm check:template-deps
- Harden CI: new audit-template-deps job gates all build jobs; add
`require.resolve('@tailwindcss/cli/package.json')` check after each
pnpm install to catch the exact "binary is not a Node.js script" failure
62 lines
1.7 KiB
TOML
62 lines
1.7 KiB
TOML
[build]
|
|
command = """
|
|
set -e
|
|
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 --no-frozen-lockfile
|
|
|
|
echo "=== Running Hugo build ==="
|
|
hugo --gc --minify -b $URL --logLevel debug --printI18nWarnings --printPathWarnings
|
|
|
|
echo "=== Running Pagefind indexing ==="
|
|
pnpm run pagefind
|
|
|
|
echo "=== Build completed successfully ==="
|
|
"""
|
|
publish = "public"
|
|
|
|
[build.environment]
|
|
HUGO_VERSION = "0.161.0"
|
|
GO_VERSION = "1.21.5"
|
|
NODE_VERSION = "22"
|
|
# Ensure Netlify's implicit install does not enforce frozen lockfiles
|
|
PNPM_FLAGS = "--no-frozen-lockfile"
|
|
HUGO_ENABLEGITINFO = "true"
|
|
HUGO_LOG_I18N_WARNINGS = "true"
|
|
HUGO_LOG_WARNINGS = "true"
|
|
FORCE_COLOR = "1"
|
|
PNPM_LOG_LEVEL = "debug"
|
|
|
|
[context.production.environment]
|
|
HUGO_ENV = "production"
|
|
|
|
[context.deploy-preview]
|
|
command = """
|
|
set -e
|
|
echo "=== Deploy Preview Build ==="
|
|
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
|
pnpm install --verbose --no-frozen-lockfile
|
|
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
|
pnpm run pagefind
|
|
"""
|
|
|
|
[context.branch-deploy]
|
|
command = """
|
|
set -e
|
|
echo "=== Branch Deploy Build ==="
|
|
echo "Deploy URL: $DEPLOY_PRIME_URL"
|
|
pnpm install --verbose --no-frozen-lockfile
|
|
hugo --gc --minify -b $DEPLOY_PRIME_URL --logLevel debug --printI18nWarnings --printPathWarnings
|
|
pnpm run pagefind
|
|
"""
|
|
|
|
[[plugins]]
|
|
package = "netlify-plugin-hugo-cache-resources"
|
|
[plugins.inputs]
|
|
debug = true
|