refactor: flatten pages structure and update setup.php for Git Sync
- Move pages/{fqdn}/pages/* to pages/{fqdn}/*
- Update setup.php to look at /user/pages/{hostname}
- Prepare for Git Sync to sync pages/ to user/pages/
This commit is contained in:
@@ -35,10 +35,10 @@ $hostMap = [
|
||||
];
|
||||
|
||||
$environment = isset($hostMap[$hostname]) ? $hostMap[$hostname] : 'staticsites.turnsys.com';
|
||||
$envPath = GRAV_ROOT . '/user/data/content/' . $environment;
|
||||
$envPath = GRAV_ROOT . '/user/pages/' . $environment;
|
||||
|
||||
if (!is_dir($envPath)) {
|
||||
$envPath = GRAV_ROOT . '/user/data/content/staticsites.turnsys.com';
|
||||
$envPath = GRAV_ROOT . '/user/pages/staticsites.turnsys.com';
|
||||
}
|
||||
|
||||
// Only override page stream - use environment pages, fallback to default
|
||||
@@ -48,7 +48,7 @@ return [
|
||||
'page' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => [
|
||||
'' => [$envPath . '/pages', 'user://pages'],
|
||||
'' => [$envPath, 'user://pages'],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user