diff --git a/scripts/view-starter-dev.sh b/scripts/view-starter-dev.sh index 40a12241..0718f35d 100755 --- a/scripts/view-starter-dev.sh +++ b/scripts/view-starter-dev.sh @@ -12,8 +12,9 @@ trap cleanup EXIT INT TERM usage() { echo "View a starter template with local development modules and debug features." echo "" - echo "Usage: ./scripts/view-starter-dev.sh [--debug] [--no-pagefind]" + echo "Usage: ./scripts/view-starter-dev.sh [] [--debug] [--no-pagefind]" echo "Example: ./scripts/view-starter-dev.sh blog --debug" + echo "Default starter: academic-cv (if no starter-name provided)" echo "" echo "This script uses:" echo " • Local development modules (via HUGO_MODULE_REPLACEMENTS)" @@ -21,12 +22,7 @@ usage() { echo " • Optional Pagefind search indexing and enhanced debugging" } -if [ $# -lt 1 ]; then - usage - exit 1 -fi - -STARTER="" +STARTER="academic-cv" # Default starter if none provided DEBUG_MODE=false PAGEFIND=true @@ -56,10 +52,6 @@ while [ $# -gt 0 ]; do esac done -if [ -z "$STARTER" ]; then - usage - exit 1 -fi # Run Hugo from the site dir so Tailwind CLI is discoverable cd "starters/$STARTER" diff --git a/scripts/view-starter-prod.sh b/scripts/view-starter-prod.sh index 7e9c14c2..14ace8e4 100755 --- a/scripts/view-starter-prod.sh +++ b/scripts/view-starter-prod.sh @@ -11,8 +11,9 @@ trap "exitfn" INT usage() { echo "View a starter template with published production modules." echo "" - echo "Usage: ./scripts/view-starter-prod.sh " + echo "Usage: ./scripts/view-starter-prod.sh []" echo "Example: ./scripts/view-starter-prod.sh blog" + echo "Default starter: academic-cv (if no starter-name provided)" echo "" echo "This script uses:" echo " • Published/released modules (no local overrides)" @@ -20,15 +21,11 @@ usage() { echo " • Minimal configuration for testing published versions" } -if [ -z "$1" ]; then - usage - exit 1 -fi - +STARTER="${1:-academic-cv}" # Default to academic-cv if no argument provided INITIAL_DIR=$(pwd) # Run Hugo from the starter directory so Tailwind v4 CLI is discoverable by Hugo -cd "starters/$1" +cd "starters/$STARTER" # Ensure Tailwind CLI is available for Hugo if [ -f "package.json" ]; then