mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 18:15:09 +00:00
feat(scripts): default to academic-cv starter when no argument provided
- Update view-starter-dev.sh to default to academic-cv if no starter specified - Update view-starter-prod.sh to default to academic-cv if no starter specified - Update usage documentation to show starter name as optional parameter - Maintain backward compatibility with existing usage patterns
This commit is contained in:
1 parent
d2f774f01f
commit
e6734f33ae
2 files changed
+7
-18
No files matched your search
@@ -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 <starter-name> [--debug] [--no-pagefind]"
|
||||
echo "Usage: ./scripts/view-starter-dev.sh [<starter-name>] [--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"
|
||||
|
||||
@@ -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 <starter-name>"
|
||||
echo "Usage: ./scripts/view-starter-prod.sh [<starter-name>]"
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user