hugo, allow specifying the baseURL since it's helpful for SEO and other things, also rename PORT variables to not collide with Ansible's PROD_PORT.

This commit is contained in:
me committed 2026-11-02 15:08:59 -07:00
1 parent a5c1eef4a8
commit 2f2484df93
5 files changed
+23 -12

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@
cd /var/www/hugo/site
FORCE="$1"
BASEURL="$2"
echo "*** Running cronjob @ `date` ***"
@@ -16,7 +17,7 @@ if [[ $status != 0 && -e /var/www/html/index.html && -z $FORCE ]]; then
fi
# If the project was not already up to date, build the new files for NGINX.
/usr/local/bin/hugo --gc --minify
/usr/local/bin/hugo $BASEURL --gc --minify
status="$?"
echo "* Hugo status is '$status', FORCE is '$FORCE'."
if [[ $status == 0 && -e public/index.html ]]; then