Add make path for hugo sites

This commit is contained in:
2026-01-17 18:58:44 +01:00
parent 6f5cb84d60
commit 5f4e209521

View File

@@ -5,6 +5,7 @@ WAF=$(where waf)
CARGO=$(where cargo) CARGO=$(where cargo)
CMAKE=$(where cmake) CMAKE=$(where cmake)
MAKE=$(where make) MAKE=$(where make)
HUGO=$(where hugo)
WAITMSG="Press any key to continue..." WAITMSG="Press any key to continue..."
@@ -66,6 +67,28 @@ then
return 0 return 0
fi fi
# look for hugo configuration
MAKEPATH=$(find-up "hugo.toml")
if [[ "$MAKEPATH" != "" ]]
then
echo "Found 'hugo.toml' file. Building website"
cd $MAKEPATH
$HUGO build -D
wait-for-keypress
return 0
fi
MAKEPATH=$(find-up "config/_default/hugo.toml")
if [[ "$MAKEPATH" != "" ]]
then
echo "Found 'hugo.toml' file. Building website"
cd $MAKEPATH
$HUGO build -D
wait-for-keypress
return 0
fi
echo "No matching makefiles found" echo "No matching makefiles found"
wait-for-keypress wait-for-keypress
return 1 return 1