From 0e00a5719263fa251c367373072afcd5ae7c9d79 Mon Sep 17 00:00:00 2001 From: Amras Date: Fri, 6 Nov 2026 23:13:39 +0100 Subject: [PATCH] Install node plugins during deploy Hugo supports using NPM as part of its build process this is required for some features, e.g. tailwindcss: https://gohugo.io/functions/css/tailwindcss/#setup This change checks if "package.json" exists. If so, it installs node and runs npm install. --- deploy.sh.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy.sh.tmpl b/deploy.sh.tmpl index e29d249..f0910bd 100755 --- a/deploy.sh.tmpl +++ b/deploy.sh.tmpl @@ -39,6 +39,13 @@ echo "◆ Install or update Hugo Modules" hugo mod get -u +echo "◆ Install or update NPM Modules" + +if [ -f "package.json" ]; then + apk add nodejs npm + npm install +fi + echo "◆ Build static HTML page with Hugo" hugo --logLevel info -- 2.54.0