From 6cb8d551bf04122bce29c570ff3605e6ec26e5cb Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Mon, 2 Mar 2026 16:07:14 -0500 Subject: [PATCH] feat: add multi-site configuration script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- scripts/configure-sites.sh | 84 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 scripts/configure-sites.sh diff --git a/scripts/configure-sites.sh b/scripts/configure-sites.sh new file mode 100644 index 0000000..a11fbf8 --- /dev/null +++ b/scripts/configure-sites.sh @@ -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."