Initial commit: site code, layouts, content (images added separately)
Fixes duplicate placeholder cover image on the 3 newest blog posts, broken aspect-ratio classes on the albums listing page, and a non-responsive fixed sidebar on the chat page.
This commit is contained in:
42
scripts/start_hugo_server.sh
Executable file
42
scripts/start_hugo_server.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Hugo Server Startup Script
|
||||
#
|
||||
# This script starts the Hugo development server with production-like settings.
|
||||
# It's designed to be run as a systemd service.
|
||||
#
|
||||
# Configuration:
|
||||
# - Site directory: /root/hydro-sterile
|
||||
# - Port: 1313 (Hugo default)
|
||||
# - Bind: 0.0.0.0 (all interfaces)
|
||||
# - Base URL: From hugo.yaml config
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SITE_DIR="/root/hydro-sterile"
|
||||
PORT="${HUGO_PORT:-7575}"
|
||||
BIND="${HUGO_BIND:-0.0.0.0}"
|
||||
BASEURL="${HUGO_BASEURL:-$(grep '^baseURL:' hugo.yaml | sed 's/.*: //' | tr -d "'\"")}"
|
||||
|
||||
cd "$SITE_DIR" || exit 1
|
||||
|
||||
# Check if Hugo is available via npm
|
||||
if command -v npm >/dev/null 2>&1 && [ -d "node_modules/.bin" ]; then
|
||||
HUGO_CMD="./node_modules/.bin/hugo"
|
||||
elif command -v hugo >/dev/null 2>&1; then
|
||||
HUGO_CMD="hugo"
|
||||
else
|
||||
echo "ERROR: Hugo not found. Please install Hugo or run 'npm install' in $SITE_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start Hugo server
|
||||
# Using --noHTTPCache for development, remove for production
|
||||
exec "$HUGO_CMD" server \
|
||||
--bind "$BIND" \
|
||||
--port "$PORT" \
|
||||
--baseURL "$BASEURL" \
|
||||
--appendPort=false \
|
||||
--disableFastRender
|
||||
|
||||
Reference in New Issue
Block a user