Files
tsysstaticsites/setup.php
Charles N Wyble 1dbbfc5d7c refactor: convert to monorepo with all 21 sites merged
- Merged 21 repos using git subtree (preserves full history)
- Content now at content/{fqdn}/pages/
- Updated setup.php to use user/data/content/ path for Git Sync
- Simplified docker-compose.yml for local testing

Sites included (238 total pages):
- charters.turnsys.com (199 pages)
- plan.knownelement.com (7 pages)
- plan.startinglineproductions.com (10 pages)
- plan.suborbital-systems.com (2 pages)
- 17 other plan.* sites (1 page each)

Assisted-by: GLM-5 via Crush <crush@charm.land>
2026-03-02 16:51:02 -05:00

57 lines
2.1 KiB
PHP

<?php
/**
* Grav Multi-Site Setup Configuration
* Maps hostnames to environment-specific directories
* Only overrides 'page' stream to serve environment-specific content
*/
$hostname = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
$hostname = preg_replace('/:\d+$/', '', $hostname);
$hostname = strtolower($hostname);
$hostMap = [
'charters.turnsys.com' => 'charters.turnsys.com',
'plan.afabn.org' => 'plan.afabn.org',
'plan.ap4ap.org' => 'plan.ap4ap.org',
'plan.ezeda.org' => 'plan.ezeda.org',
'plan.ezpodstack.org' => 'plan.ezpodstack.org',
'plan.hfnoc.net' => 'plan.hfnoc.net',
'plan.knownelement.com' => 'plan.knownelement.com',
'plan.meetmorse.com' => 'plan.meetmorse.com',
'plan.merchantsofhope.org' => 'plan.merchantsofhope.org',
'plan.rackrental.net' => 'plan.rackrental.net',
'plan.redwfo.com' => 'plan.redwfo.com',
'plan.rwscp.net' => 'plan.rwscp.net',
'plan.sidedoorgroup.org' => 'plan.sidedoorgroup.org',
'plan.sol-calc.com' => 'plan.sol-calc.com',
'plan.suborbital-systems.com' => 'plan.suborbital-systems.com',
'plan.teamrental.net' => 'plan.teamrental.net',
'plan.thecampustradingcompany.com' => 'plan.thecampustradingcompany.com',
'plan.thepeernet.com' => 'plan.thepeernet.com',
'plan.turnsys.com' => 'plan.turnsys.com',
'plan.yourdreamnamehere.com' => 'plan.yourdreamnamehere.com',
'plan.startinglineproductions.com' => 'plan.startinglineproductions.com',
'staticsites.turnsys.com' => 'staticsites.turnsys.com',
];
$environment = isset($hostMap[$hostname]) ? $hostMap[$hostname] : 'staticsites.turnsys.com';
$envPath = GRAV_ROOT . '/user/data/content/' . $environment;
if (!is_dir($envPath)) {
$envPath = GRAV_ROOT . '/user/data/content/staticsites.turnsys.com';
}
// Only override page stream - use environment pages, fallback to default
return [
'streams' => [
'schemes' => [
'page' => [
'type' => 'ReadOnlyStream',
'prefixes' => [
'' => [$envPath . '/pages', 'user://pages'],
],
],
],
],
];