Version 1.7.1 — auto default_page detection

- config.json now has default_page: auto for fresh installs
- CodePressCMS::detectDefaultPage() scans content/ for first available file
- getHomepageTitle() also respects auto mode
- Admin config form preserves auto as selectable option
- Save handler falls back to auto instead of index
This commit is contained in:
2026-07-28 15:39:12 +02:00
parent 50d19b2c11
commit 842046ac82
6 changed files with 54 additions and 7 deletions
+1 -1
View File
@@ -736,7 +736,7 @@ function handleConfig(AdminAuth $auth, array $config): void
$messageType = 'danger';
} else {
$configData['site_title'] = trim($_POST['site_title'] ?? 'CodePress');
$configData['default_page'] = trim($_POST['default_page'] ?? 'index');
$configData['default_page'] = trim($_POST['default_page'] ?? 'auto');
$configData['language']['default'] = trim($_POST['language_default'] ?? 'nl');
$configData['language']['available'] = $_POST['language_available'] ?? ['nl', 'en'];
$configData['seo']['description'] = trim($_POST['seo_description'] ?? '');