Vervang raw JSON config editor door instellingenformulier met default_page dropdown

- Admin config pagina is nu een formulier met secties voor algemeen, taal,
  SEO, auteur en features
- Startpagina instelbaar via dropdown met beschikbare pagina's uit content/
- Handleiding (nl/en) bijgewerkt met nieuwe configuratie-instructies
This commit is contained in:
2026-07-28 13:49:33 +02:00
parent 4bb138eb92
commit e85f6e91e1
4 changed files with 218 additions and 55 deletions
+20 -12
View File
@@ -31,8 +31,8 @@ CodePress CMS is a lightweight, file-based content management system built with
- Search URL: `?search=query`
### Configuration
- **JSON configuration** in `config.json`
- Dynamic homepage setting (`default_page`)
- **Settings form** in admin panel via `/admin/config`
- Dynamic homepage setting via dropdown
- SEO settings (description, keywords)
- Author information with links
- Theme configuration via `themes/` directory
@@ -58,7 +58,7 @@ CodePress CMS is a lightweight, file-based content management system built with
- **CodeMirror editor** with toolbar (bold, italic, heading, link, image, list, media insert)
- **Media browser modal** in the editor for selecting images/files
- **Directory management** - Create, rename and delete directories (empty only)
- **Configuration editor** - Edit `config.json` with JSON validation
- **Configuration editor** - Settings form for site configuration (title, homepage, language, SEO, author, features)
- **Theme management** - Create, activate, edit (colors, background) and delete themes
- **Plugin management** - Overview, create, edit, configure, enable/disable and delete
- **Media management** - Upload and delete media files in `content/-assets/`
@@ -157,7 +157,19 @@ codepress/
## Configuration
### Basic Configuration (`config.json`)
### Basic Configuration
The site configuration is managed via the **admin panel** at `/admin/config`. Here you'll find a settings form with the following sections:
- **General settings** - Site title and homepage (dropdown with available pages)
- **Language** - Default language and available languages
- **SEO** - Meta description and keywords
- **Author** - Name and website
- **Features** - Auto-link pages, search, breadcrumbs, show version
The configuration is stored in `config.json`. You can also edit this file manually for advanced options like `active_theme`, `content_dir` and `templates_dir`.
### Example `config.json`
```json
{
@@ -186,11 +198,6 @@ codepress/
}
```
- `active_theme` - Determines which theme from `themes/` is active
- `templates_dir` - Directory with Mustache templates (`cms/templates`)
- `default_page` - Default page (e.g. `index`)
- `content_dir` - Directory with content files (usually not changed)
### Theme Configuration (`themes/<name>/theme.json`)
```json
@@ -268,7 +275,7 @@ Media files (images, PDFs, video, audio) can be placed in any `content/` subdire
| `content-dir-rename` | Rename directory |
| `content-dir-create` | Create directory (POST) |
| `content-dir-delete` | Delete directory (empty only) |
| `config` | Configuration editor (`config.json`) |
| `config` | Configuration form (title, homepage, language, SEO, author, features) |
| `theme` | Theme management |
| `plugins` | Plugin overview |
| `plugins-new` | Create new plugin |
@@ -499,8 +506,9 @@ The MQTTTracker plugin stores `broker_host`, `broker_port`, `client_id`, `userna
### How do I set the homepage?
1. **Automatic**: Set `"default_page": "index"` in `config.json` (or omit the field)
2. **Manual**: Set `"default_page": "page-name"` in `config.json`
1. Go to **Configuration** in the admin panel (`/admin/config`)
2. Select the desired page in the **Default/homepage** dropdown
3. Click **Save configuration**
### How does navigation work?