feat: add multi-site configuration script
- Create configure-sites.sh to generate per-site Grav configs - Generates system.yaml, site.yaml, and default home page - Configures all 22 sites with appropriate titles - Script executed in container to configure all environments Each site now has: - config/system.yaml: Grav system settings (quark theme, caching) - config/site.yaml: Site metadata (title, author, description) - pages/01.home/default.md: Placeholder home page 🤖 Generated with [Crush](https://crush.cbhops.com) Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
84
scripts/configure-sites.sh
Normal file
84
scripts/configure-sites.sh
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/bin/bash
|
||||
# Generate Grav config and pages for all sites
|
||||
|
||||
declare -A SITES=(
|
||||
["governance.turnsys.com"]="TSYS Group Governance"
|
||||
["plan.afabn.org"]="AFABN Business Plan"
|
||||
["plan.ap4ap.org"]="AP4AP Business Plan"
|
||||
["plan.ezeda.org"]="EzEDA Business Plan"
|
||||
["plan.ezpodstack.org"]="EzPodStack Business Plan"
|
||||
["plan.hfnoc.net"]="High Flight NOC Business Plan"
|
||||
["plan.knownelement.com"]="Known Element Business Plan"
|
||||
["plan.meetmorse.com"]="MeetMorse Business Plan"
|
||||
["plan.merchantsofhope.org"]="Merchants of Hope Business Plan"
|
||||
["plan.rackrental.net"]="RackRental Business Plan"
|
||||
["plan.redwfo.com"]="Redwood Family Office Business Plan"
|
||||
["plan.rwscp.net"]="RWSCP Business Plan"
|
||||
["plan.sidedoorgroup.org"]="Side Door Group Business Plan"
|
||||
["plan.sol-calc.com"]="Sol-Calc Business Plan"
|
||||
["plan.suborbital-systems.com"]="Suborbital Systems Business Plan"
|
||||
["plan.teamrental.net"]="TeamRental Business Plan"
|
||||
["plan.thecampustradingcompany.com"]="Campus Trading Company Business Plan"
|
||||
["plan.thepeernet.com"]="The Peer Network Business Plan"
|
||||
["plan.turnsys.com"]="TSYS Business Plan"
|
||||
["plan.yourdreamnamehere.com"]="Your Dream Name Here Business Plan"
|
||||
["startinglineproductions.com-bizopprodplan"]="Starting Line Productions Business Plan"
|
||||
["staticsites.turnsys.com"]="TSYS Static Sites"
|
||||
)
|
||||
|
||||
BASE="/var/www/html/user/env"
|
||||
|
||||
for FQDN in "${!SITES[@]}"; do
|
||||
TITLE="${SITES[$FQDN]}"
|
||||
SITE_PATH="$BASE/$FQDN"
|
||||
|
||||
# Create system.yaml
|
||||
cat > "$SITE_PATH/config/system.yaml" << EOF
|
||||
absolute_urls: true
|
||||
home:
|
||||
alias: '/home'
|
||||
pages:
|
||||
theme: quark
|
||||
markdown:
|
||||
extra: true
|
||||
process:
|
||||
markdown: true
|
||||
twig: false
|
||||
cache:
|
||||
enabled: true
|
||||
check:
|
||||
method: file
|
||||
driver: auto
|
||||
prefix: 'g'
|
||||
EOF
|
||||
|
||||
# Create site.yaml
|
||||
cat > "$SITE_PATH/config/site.yaml" << EOF
|
||||
title: '$TITLE'
|
||||
author:
|
||||
name: 'TSYS Group'
|
||||
email: 'admin@turnsys.com'
|
||||
taxonomies: [category, tag]
|
||||
metadata:
|
||||
description: '$TITLE'
|
||||
EOF
|
||||
|
||||
# Create home page
|
||||
mkdir -p "$SITE_PATH/pages/01.home"
|
||||
cat > "$SITE_PATH/pages/01.home/default.md" << EOF
|
||||
---
|
||||
title: '$TITLE'
|
||||
---
|
||||
|
||||
## $TITLE
|
||||
|
||||
This site is powered by Grav CMS.
|
||||
|
||||
Content migrated from mdbook coming soon...
|
||||
EOF
|
||||
|
||||
echo "Configured: $FQDN"
|
||||
done
|
||||
|
||||
chown -R www-data:www-data "$BASE"
|
||||
echo "All sites configured."
|
||||
Reference in New Issue
Block a user