Fix guide template variable replacement and enhance documentation

- Fix template variable replacement in guide pages by removing {{}} brackets
- Escape code blocks in guide markdown to prevent template processing
- Completely rewrite guide documentation with comprehensive CMS features
- Add bilingual guide support (English/Dutch) with detailed examples
- Enhance CodePressCMS core with improved guide page handling
- Update template system with better layout and footer components
- Improve language files with additional translations
- Update configuration with enhanced theme and language settings

Resolves issue where guide pages were showing replaced template variables
instead of displaying them as documentation examples.
This commit is contained in:
2025-11-26 16:50:49 +01:00
parent f5ac28a74e
commit 9c5a43c5ce
17 changed files with 1684 additions and 462 deletions

View File

@@ -1,191 +1,68 @@
# CodePress CMS Guide
## Welcome to CodePress CMS
## Welcome to CodePress
CodePress is a lightweight, file-based Content Management System built with PHP and Bootstrap.
### Table of Contents
## Features
1. [Getting Started](#getting-started)
2. [Content Management](#content-management)
3. [Templates](#templates)
4. [Configuration](#configuration)
### 🏠 Navigation
- Tab-style navigation with Bootstrap styling
- Dropdown menus for folders and sub-folders
- Home button with icon
- Automatic menu generation
- Responsive design
- Breadcrumb navigation
- Active state marking
---
### 📄 Content Types
- **Markdown (.md)** - CommonMark support
- **PHP (.php)** - Dynamic content
- **HTML (.html)** - Static HTML pages
- **Directory listings** - Automatic directory overviews
- **Language-specific content** - `en.` and `nl.` prefixes
## Getting Started
### 🔍 Search Functionality
- Full-text search through all content
- Results with snippets and highlighting
- Direct navigation to found pages
- SEO-friendly search results
- Search URL: `?search=query`
### Requirements
- PHP 8.4+
- Web server (Apache/Nginx)
- Modern web browser
- Write permissions for content directory
### 🧭 Configuration
- **JSON configuration** in `config.json`
- Dynamic homepage setting
- SEO settings (description, keywords)
- Author information with links
- Theme configuration with colors
- Language settings
- Feature toggles
### Installation
1. Clone or download the CodePress files
### 🎨 Layout & Design
- Flexbox layout for responsive structure
- Fixed header with logo and search
- Breadcrumb navigation
- Fixed footer with file info and links
- Bootstrap 5 styling
- Mustache templates
- Semantic HTML5 structure
- **Dynamic layouts** with YAML frontmatter
- **Sidebar support** with plugin integration
## Installation
1. Clone or download CodePress files
2. Upload to your web server
3. Make sure the `content/` directory is writable
4. Navigate to your website in the browser
3. Make sure `content/` directory is writable
4. Navigate to your website in browser
### Basic Configuration
The most important settings are in `engine/core/config.php`:
```php
$config = [
'site_title' => 'My Website',
'default_page' => 'home',
'content_dir' => __DIR__ . '/../../content',
'templates_dir' => __DIR__ . '/../templates'
];
```
---
## Content Management {#content-management}
### File Structure
```
content/
├── home.md # Home page
├── blog/
│ ├── index.md # Blog overview
│ ├── article-1.md # Blog article
│ └── category/
│ └── article.md # Article in category
└── about-us/
└── info.md # About us page
```
### Content Types
CodePress supports four content types:
#### Markdown (`.md`)
```markdown
# Page Title
This is page content in **Markdown** format with CommonMark extensions.
## Subsection
- [x] Task list item
- [ ] Another task
- **Bold** and *italic* text
- [Auto-linked pages](?page=another-page)
```
#### PHP (`.php`)
```php
<?php
$title = "Dynamic Page";
?>
<h1><?php echo htmlspecialchars($title); ?></h1>
<p>This is dynamic content with PHP.</p>
```
#### HTML (`.html`)
```html
<h1>HTML Page</h1>
<p>This is static HTML content.</p>
```
#### Directory Listings
Directories automatically generate listings:
- File information (size, dates)
- Navigation to subdirectories
- Responsive file listing layout
#### PHP (`.php`)
```php
<?php
$title = "Dynamic Page";
?>
<h1><?php echo $title; ?></h1>
<p>This is dynamic content with PHP.</p>
```
#### HTML (`.html`)
```html
<h1>HTML Page</h1>
<p>This is static HTML content.</p>
```
### Automatic Linking
CodePress automatically creates links to other pages when you mention page names in your content.
### Language Support
- **Browser detection**: Automatic language detection
- **URL switching**: `?lang=en` or `?lang=nl`
- **Language prefixes**: `en.page.md` and `nl.page.md`
- **Translation files**: `lang/en.php` and `lang/nl.php`
### Search Functionality
- **Full-text search**: Search through all content
- **Search URL**: `?search=query` for bookmarkable searches
- **Result highlighting**: Search terms highlighted in results
- **File and content search**: Searches both filenames and content
---
## Templates {#templates}
### Template Structure
CodePress uses Mustache-compatible templates:
- `layout.mustache` - Main template
- `assets/header.mustache` - Header component
- `assets/sidebar.mustache` - Sidebar navigation
- `assets/footer.mustache` - Footer component
### Template Variables
Available variables in templates:
#### **Site Info**
- `{{site_title}}` - Website title
- `{{author_name}}` - Author name
- `{{author_website}}` - Author website
- `{{author_git}}` - Git repository link
#### **Page Info**
- `{{page_title}}` - Page title (filename without extension)
- `{{content}}` - Page content (HTML)
- `{{file_info}}` - File information (dates, size)
- `{{is_homepage}}` - Boolean: is this the homepage?
#### **Navigation**
- `{{menu}}` - Navigation menu
- `{{breadcrumb}}` - Breadcrumb navigation
- `{{homepage}}` - Homepage link
- `{{homepage_title}}` - Homepage title
#### **Theme**
- `{{header_color}}` - Header background color
- `{{header_font_color}}` - Header text color
- `{{navigation_color}}` - Navigation background color
- `{{navigation_font_color}}` - Navigation text color
#### **Language**
- `{{current_lang}}` - Current language (en/nl)
- `{{current_lang_upper}}` - Current language (EN/NL)
- `{{available_langs}}` - Available languages
- `{{t_*}}` - Translated strings (t_home, t_search, etc.)
#### **SEO**
- `{{seo_description}}` - Meta description
- `{{seo_keywords}}` - Meta keywords
#### **Features**
- `{{has_content}}` - Boolean: is content available?
- `{{show_site_link}}` - Boolean: show site link?
- `{{is_guide_page}}` - Boolean: is this the guide page?
---
## Configuration {#configuration}
## Configuration
### Basic Settings
Edit `config.json` in your project root:
```json
\`\`\`json
{
"site_title": "Your Website Name",
"content_dir": "content",
@@ -199,12 +76,13 @@ Edit `config.json` in your project root:
"header_color": "#0a369d",
"header_font_color": "#ffffff",
"navigation_color": "#2754b4",
"navigation_font_color": "#ffffff"
"navigation_font_color": "#ffffff",
"sidebar_background": "#f8f9fa",
"sidebar_border": "#dee2e6"
},
"author": {
"name": "Your Name",
"website": "https://yourwebsite.com",
"git": "https://github.com/youruser/codepress"
"website": "https://yourwebsite.com"
},
"seo": {
"description": "Your website description",
@@ -216,70 +94,232 @@ Edit `config.json` in your project root:
"breadcrumbs_enabled": true
}
}
```
\`\`\`
### SEO Friendly URLs
CodePress automatically generates clean URLs:
- `home.md``?page=home`
- `blog/article.md``?page=blog/article`
- `nl.page.md``?page=nl.page&lang=nl`
## Content Management
### Language Support
- **Browser detection**: Automatic language detection
- **URL switching**: `?lang=en` or `?lang=nl`
### File Structure
\`\`\`
content/
├── home.md # Home page
├── blog/
│ ├── index.md # Blog overview
│ ├── article-1.md # Blog article
│ └── category/
│ └── article.md # Article in category
└── about-us/
└── info.md # About us page
\`\`\`
### Content Types
#### Markdown (`.md`)
\`\`\`markdown
# Page Title
This is page content in **Markdown** format with CommonMark extensions.
## Subsection
- [x] Task list item
- [ ] Another task
- **Bold** and *italic* text
- [Auto-linked pages](?page=another-page)
\`\`\`
#### PHP (`.php`)
\`\`\`php
<?php
$title = "Dynamic Page";
?>
<h1><?php echo htmlspecialchars($title); ?></h1>
<p>This is dynamic content with PHP.</p>
\`\`\`
#### HTML (`.html`)
\`\`\`html
<h1>HTML Page</h1>
<p>This is static HTML content.</p>
\`\`\`
### File Naming Conventions
- **Lowercase names**: Use lowercase for all files
- **No spaces**: Use hyphens (-) or underscores (_)
- **Language prefixes**: `en.page.md` and `nl.page.md`
- **Directory precedence**: Directories take precedence over files
- **Display names**: `file-name.md` displays as "File Name" in menus
### Search Functionality
The built-in search function searches through:
- File names
- Content of Markdown/PHP/HTML files
- Search URL: `?search=query` for bookmarkable searches
- Result highlighting and snippets
## Templates
### Directory Listings
- **Auto-generation**: `?page=directory` shows directory contents
- **File information**: Creation/modification dates and sizes
- **Navigation**: Links to files and subdirectories
### Template Variables
#### Site Info
- `site_title` - Website title
- `author_name` - Author name
- `author_website` - Author website
- `author_git` - Git repository link
#### Page Info
- `page_title` - Page title (filename without extension)
- `content` - Page content (HTML)
- `file_info` - File information (dates, size)
- `is_homepage` - Boolean: is this homepage?
#### Navigation
- `menu` - Navigation menu
- `breadcrumb` - Breadcrumb navigation
- `homepage` - Homepage link
#### Theme
- `header_color` - Header background color
- `header_font_color` - Header text color
- `navigation_color` - Navigation background color
- `navigation_font_color` - Navigation text color
#### Language
- `current_lang` - Current language (en/nl)
- `current_lang_upper` - Current language (EN/NL)
- `t_*` - Translated strings
## URL Structure
### Basic URLs
- **Home**: `/` or `?page=home`
- **Page**: `?page=blog/article`
- **Search**: `?search=query`
- **Guide**: `?guide`
- **Language**: `?lang=en` or `?lang=nl`
## SEO Optimization
### Meta Tags
The CMS automatically adds meta tags:
\`\`\`html
<meta name="generator" content="CodePress CMS">
<meta name="application-name" content="CodePress">
<meta name="author" content="Your Name">
<meta name="description" content="...">
<meta name="keywords" content="...">
<link rel="author" href="https://yourwebsite.com">
<link rel="me" href="https://github.com/youruser/codepress">
\`\`\`
## 🔌 Plugin System
### Plugin Structure
\`\`\`
plugins/
├── README.md # Plugin documentation
├── HTMLBlock/
│ ├── HTMLBlock.php # Plugin class
│ └── README.md # Plugin specific documentation
└── MQTTTracker/
├── MQTTTracker.php # Plugin class
├── config.json # Plugin configuration
└── README.md # Plugin documentation
\`\`\`
### Plugin Development
- **API access** via `CMSAPI` class
- **Sidebar content** with `getSidebarContent()`
- **Metadata access** from YAML frontmatter
- **Configuration** via JSON files
- **Event hooks** for extension
### Available Plugins
- **HTMLBlock** - Custom HTML blocks in sidebar
- **MQTTTracker** - Real-time analytics and tracking
## 🎯 Template System
### Layout Options
Use YAML frontmatter to select layout:
\`\`\`yaml
---
title: My Page
layout: sidebar-content
---
\`\`\`
### Available Layouts
- `sidebar-content` - Sidebar left, content right (default)
- `content` - Content only (full width)
- `sidebar` - Sidebar only
- `content-sidebar` - Content left, sidebar right
- `content-sidebar-reverse` - Content right, sidebar left
### Meta Data
\`\`\`yaml
---
title: Page Title
layout: content-sidebar
description: Page description
author: Author Name
date: 2025-11-26
---
\`\`\`
## 📊 Analytics & Tracking
### MQTT Tracker
- Real-time page tracking
- Session management
- Business Intelligence data
- Privacy aware (GDPR compliant)
- MQTT integration for dashboards
### Data Format
\`\`\`json
{
"timestamp": "2025-11-26T15:30:00+00:00",
"session_id": "cms_1234567890abcdef",
"page_url": "?page=demo/sidebar-content&lang=en",
"page_title": "Sidebar-Content Layout",
"language": "en",
"layout": "sidebar-content"
}
\`\`\`
## Tips and Tricks
### Page Organization
- Use subdirectories for categories
- Give each directory an `index.md` for an overview page
- Keep file names short and descriptive
- Use language prefixes: `en.page.md` and `nl.page.md`
- Directory names take precedence over files with same name
### File Naming Conventions
- **Lowercase names**: Use lowercase for all files
- **No spaces**: Use hyphens (-) or underscores (_)
- **Language prefixes**: `en.` or `nl.` for multilingual content
- **Display names**: `file-name.md` displays as "File Name" in menus
- **Special cases**: `phpinfo` → "phpinfo", `ict` → "ICT"
### Content Optimization
- Use clear headings (H1, H2, H3)
- Add descriptive meta information
- Use internal links for better navigation
### Security
- Keep your CodePress installation updated
- Restrict write permissions on the `content/` directory
- Use HTTPS when possible
## Troubleshooting
---
### Common Issues
## Support
### Troubleshooting
- **Empty pages**: Check file permissions
- **Template errors**: Verify template syntax
- **404 errors**: Check file names and paths
- **Navigation not updated**: Reload the page
## Support
### More Information
- Documentation: [CodePress GitHub](https://git.noorlander.info/E.Noorlander/CodePress.git)
- Issues and feature requests: GitHub Issues

View File

@@ -2,84 +2,70 @@
## Overzicht
CodePress CMS is een lichtgewicht, file-based content management systeem gebouwd met PHP. Het is ontworpen om eenvoudig te gebruiken, flexibel te zijn en zonder database te werken.
CodePress CMS is een lichtgewicht, file-based content management systeem gebouwd met PHP. Werkt zonder database.
## Functies
### 🏠 **Navigatie**
- **Tab-style navigatie** met Bootstrap styling
- **Dropdown menus** voor mappen en sub-mappen
- **Home knop** met icoon die linkt naar de ingestelde homepage
- **Automatische menu generatie** op basis van content structuur
- **Responsive design** voor mobiele apparaten
- **Breadcrumb navigatie** met home icoon en pad weergave
- **Active state marking** voor huidige pagina in menu
### 🏠 Navigatie
- Tab-style navigatie met Bootstrap styling
- Dropdown menus voor mappen en sub-mappen
- Home knop met icoon
- Automatische menu generatie
- Responsive design
- Breadcrumb navigatie
- Active state marking
### 📄 **Content Types**
- **Markdown (.md)** - Met CommonMark ondersteuning en extensies (autolink, strikethrough, tables, task lists)
- **PHP (.php)** - Voor dynamische content en functionaliteit
- **HTML (.html)** - Voor statische HTML pagina's
- **Directory listings** - Automatische generatie van directory overzichten
- **Language-specific content** - `nl.` en `en.` prefix voor meertalige content
- **Automatische template selectie** op basis van bestandstype
### 📄 Content Types
- **Markdown (.md)** - CommonMark ondersteuning
- **PHP (.php)** - Dynamische content
- **HTML (.html)** - Statische HTML pagina's
- **Directory listings** - Automatische directory overzichten
- **Language-specific content** - `nl.` en `en.` prefix
### 🔍 **Zoekfunctionaliteit**
- **Volledige tekst zoek** door alle content bestanden
- **Resultaten met snippets** en highlighting
- **Directe navigatie** naar gevonden pagina's
- **SEO-vriendelijke** zoekresultaten
- **Search URL**: `?search=zoekterm` voor bookmarkable searches
### 🔍 Zoekfunctionaliteit
- Volledige tekst zoek door alle content
- Resultaten met snippets en highlighting
- Directe navigatie naar gevonden pagina's
- SEO-vriendelijke zoekresultaten
- Search URL: `?search=zoekterm`
### 🧭 **Configuratie**
- **JSON configuratie** in project root (`config.json`)
- **Dynamische homepage** instelling of automatische detectie
- **SEO instellingen** (description, keywords)
- **Author informatie** met links naar website en Git
- **Thema configuratie** met kleur instellingen
- **Language settings** voor meertalige content
- **Feature toggles** voor search, breadcrumbs, auto-linking
### 🧭 Configuratie
- **JSON configuratie** in `config.json`
- Dynamische homepage instelling
- SEO instellingen (description, keywords)
- Author informatie met links
- Thema configuratie met kleuren
- Language settings
- Feature toggles
### 🎨 **Layout & Design**
- **Flexbox layout** voor moderne, responsive structuur
- **Fixed header** met logo en zoekfunctie
- **Breadcrumb navigatie** tussen header en content
- **Fixed footer** met file info en links
- **Bootstrap 5** styling en componenten
- **Custom CSS** voor specifieke styling
- **Mustache templates** met conditionals en partials
- **Semantic HTML5** structuur voor SEO
### 📱 **Responsive Features**
- **Mobile-first** aanpak
- **Hamburger menu** voor kleine schermen
- **Touch-friendly** dropdowns en navigatie
- **Adaptieve breedtes** voor verschillende schermgroottes
### 🌍 **Language Support**
- **Browser language detection** op basis van Accept-Language header
- **URL language switching**: `?lang=nl` of `?lang=en`
- **Translation files**: `lang/nl.php` en `lang/en.php`
- **Language prefixes**: `nl.bestand.md` en `en.bestand.md`
- **Automatic language routing** voor meertalige content
### 🎨 Layout & Design
- Flexbox layout voor responsive structuur
- Fixed header met logo en zoekfunctie
- Breadcrumb navigatie
- Fixed footer met file info en links
- Bootstrap 5 styling
- Mustache templates
- Semantic HTML5 structuur
- **Dynamic layouts** met YAML frontmatter
- **Sidebar support** met plugin integratie
## Installatie
1. **Upload bestanden** naar webserver
2. **Stel permissies in** voor webserver
3. **Configureer** `config.json` indien nodig
4. **Toegang** tot website via browser
1. Upload bestanden naar webserver
2. Stel permissies in voor webserver
3. Configureer `config.json` indien nodig
4. Toegang tot website via browser
## Configuratie
### Basis Configuratie (`config.json`)
```json
\`\`\`json
{
"site_title": "CodePress",
"content_dir": "content",
"templates_dir": "engine/templates",
"default_page": "auto",
"homepage": "welkom",
"language": {
"default": "nl",
"available": ["nl", "en"]
@@ -88,12 +74,13 @@ CodePress CMS is een lichtgewicht, file-based content management systeem gebouwd
"header_color": "#0a369d",
"header_font_color": "#ffffff",
"navigation_color": "#2754b4",
"navigation_font_color": "#ffffff"
"navigation_font_color": "#ffffff",
"sidebar_background": "#f8f9fa",
"sidebar_border": "#dee2e6"
},
"author": {
"name": "Edwin Noorlander",
"website": "https://noorlander.info",
"git": "https://git.noorlander.info/E.Noorlander/CodePress.git"
"name": "E. Noorlander",
"website": "https://noorlander.info"
},
"seo": {
"description": "CodePress CMS - Lightweight file-based content management system",
@@ -105,27 +92,13 @@ CodePress CMS is een lichtgewicht, file-based content management systeem gebouwd
"breadcrumbs_enabled": true
}
}
```
### Configuratie Opties
- **`site_title`** - Naam van de website
- **`content_dir`** - Map met content bestanden
- **`templates_dir`** - Map met template bestanden
- **`default_page`** - Standaard pagina (`"auto"` voor automatische detectie)
- **`homepage`** - Specifieke homepage (`"auto"` voor automatische detectie)
- **`language.default`** - Standaard taal
- **`language.available`** - Beschikbare talen
- **`theme.*`** - Kleur instellingen voor header en navigatie
- **`author`** - Auteur informatie met links
- **`seo`** - SEO instellingen
- **`features.*`** - Feature toggles (search, breadcrumbs, auto-linking)
\`\`\`
## Content Structuur
### Bestandsstructuur
```
\`\`\`
content/
├── map1/
│ ├── submap1/
@@ -136,74 +109,47 @@ content/
│ └── pagina4.md
├── homepage.md
└── index.html
```
\`\`\`
### Bestandsnamen
- **Gebruik lowercase** bestandsnamen
- **Geen spaties** - gebruik `-` of `_` als scheidingsteken
- **Logische extensies** - `.md`, `.php`, `.html`
- **Unieke namen** - geen duplicaten binnen dezelfde map
- **Language prefixes** - `nl.bestand.md` en `en.bestand.md` voor meertalige content
- **Display names** - `bestands-naam` wordt automatisch "Bestands Naam" in menu's
- **Special cases** - `phpinfo` → "phpinfo", `ict` → "ICT"
- Gebruik lowercase bestandsnamen
- Geen spaties - gebruik `-` of `_`
- Logische extensies - `.md`, `.php`, `.html`
- Unieke namen - geen duplicaten
- Language prefixes - `nl.bestand.md` en `en.bestand.md`
## Templates
### Template Structuur
```
engine/templates/
├── layout.mustache - Hoofd layout template
├── assets/
│ ├── header.mustache - Header template
│ ├── navigation.mustache - Navigatie template
│ └── footer.mustache - Footer template
├── markdown_content.mustache - Markdown content template
├── php_content.mustache - PHP content template
└── html_content.mustache - HTML content template
```
### Template Variabelen
#### **Site Info**
- **`{{site_title}}`** - Website titel
- **`{{author_name}}`** - Auteur naam
- **`{{author_website}}`** - Auteur website
- **`{{author_git}}`** - Git repository link
#### Site Info
- `site_title` - Website titel
- `author_name` - Auteur naam
- `author_website` - Auteur website
- `author_git` - Git repository link
#### **Page Info**
- **`{{page_title}}`** - Pagina titel (bestandsnaam zonder extensie)
- **`{{content}}`** - Content (HTML)
- **`{{file_info}}`** - Bestandsinformatie (datum, grootte)
- **`{{is_homepage}}`** - Boolean: is dit de homepage?
#### Page Info
- `page_title` - Pagina titel
- `content` - Content (HTML)
- `file_info` - Bestandsinformatie
- `is_homepage` - Boolean: is dit de homepage?
#### **Navigation**
- **`{{menu}}`** - Navigatie menu
- **`{{breadcrumb}}`** - Breadcrumb navigatie
- **`{{homepage}}`** - Homepage link
- **`{{homepage_title}}`** - Homepage titel
#### Navigation
- `menu` - Navigatie menu
- `breadcrumb` - Breadcrumb navigatie
- `homepage` - Homepage link
#### **Theme**
- **`{{header_color}}`** - Header achtergrondkleur
- **`{{header_font_color}}`** - Header tekstkleur
- **`{{navigation_color}}`** - Navigatie achtergrondkleur
- **`{{navigation_font_color}}`** - Navigatie tekstkleur
#### Theme
- `header_color` - Header achtergrondkleur
- `header_font_color` - Header tekstkleur
- `navigation_color` - Navigatie achtergrondkleur
- `navigation_font_color` - Navigatie tekstkleur
#### **Language**
- **`{{current_lang}}`** - Huidige taal (nl/en)
- **`{{current_lang_upper}}`** - Huidige taal (NL/EN)
- **`{{available_langs}}`** - Beschikbare talen
- **`{{t_*}}`** - Vertaalde strings (t_home, t_search, etc.)
#### **SEO**
- **`{{seo_description}}`** - Meta description
- **`{{seo_keywords}}`** - Meta keywords
#### **Features**
- **`{{has_content}}`** - Boolean: is er content beschikbaar?
- **`{{show_site_link}}`** - Boolean: toon site link?
- **`{{is_guide_page}}`** - Boolean: is dit de handleiding pagina?
#### Language
- `current_lang` - Huidige taal (nl/en)
- `current_lang_upper` - Huidige taal (NL/EN)
- `t_*` - Vertaalde strings
## URL Structuur
@@ -214,99 +160,121 @@ engine/templates/
- **Handleiding**: `?guide`
- **Language**: `?lang=nl` of `?lang=en`
### File Extensions
Bestandsextensies worden automatisch gedetecteerd:
- `pagina.md``?page=pagina`
- `pagina.php``?page=pagina`
- `pagina.html``?page=pagina`
### Language Support
- **Browser detection**: Automatische taal detectie
- **URL switching**: `?page=nl.bestand&lang=nl`
- **Language prefixes**: `nl.bestand.md` en `en.bestand.md`
- **Directory precedence**: Directories hebben voorrang op bestanden
### Directory Listings
- **Auto-generation**: `?page=map` toont directory inhoud
- **File info**: Creatie/modificatie datums en groottes
- **Navigation**: Links naar bestanden en submappen
## SEO Optimalisatie
### Meta Tags
De CMS voegt automatisch de volgende meta tags toe:
```html
De CMS voegt automatisch meta tags toe:
\`\`\`html
<meta name="generator" content="CodePress CMS">
<meta name="application-name" content="CodePress">
<meta name="author" content="Edwin Noorlander">
<meta name="author" content="E. Noorlander">
<meta name="description" content="...">
<meta name="keywords" content="...">
<link rel="author" href="https://noorlander.info">
<link rel="me" href="https://git.noorlander.info/E.Noorlander/CodePress.git">
```
\`\`\`
### Auto-linking
## 🔌 Plugin Systeem
De CMS linkt automatisch pagina titels naar hun content:
### Plugin Structuur
- **Automatische detectie** van pagina titels in tekst
- **Slimme links** met `title` attributen
- **Geen dubbele links** voor dezelfde pagina
- **SEO-vriendelijke** URL structuur
\`\`\`
plugins/
├── README.md
├── HTMLBlock/
│ ├── HTMLBlock.php
│ └── README.md
└── MQTTTracker/
├── MQTTTracker.php
├── config.json
└── README.md
\`\`\`
### Plugin Development
- **API toegang** via `CMSAPI` class
- **Sidebar content** met `getSidebarContent()`
- **Metadata toegang** uit YAML frontmatter
- **Configuratie** via JSON bestanden
### Beschikbare Plugins
- **HTMLBlock** - Custom HTML blokken in sidebar
- **MQTTTracker** - Real-time analytics en tracking
## 🎯 Template Systeem
### Layout Opties
Gebruik YAML frontmatter om layout te selecteren:
\`\`\`yaml
---
title: Mijn Pagina
layout: sidebar-content
---
\`\`\`
### Beschikbare Layouts
- `sidebar-content` - Sidebar links, content rechts (standaard)
- `content` - Alleen content (volle breedte)
- `sidebar` - Alleen sidebar
- `content-sidebar` - Content links, sidebar rechts
- `content-sidebar-reverse` - Content rechts, sidebar links
### Meta Data
\`\`\`yaml
---
title: Pagina Titel
layout: content-sidebar
description: Pagina beschrijving
author: Auteur Naam
date: 2025-11-26
---
\`\`\`
## 📊 Analytics & Tracking
### MQTT Tracker
- Real-time page tracking
- Session management
- Business Intelligence data
- Privacy aware (GDPR compliant)
- MQTT integration voor dashboards
## Veelgestelde Vragen
### Hoe stel ik de homepage in?
1. **Automatisch**: Laat de CMS het eerste bestand kiezen
2. **Handmatig**: Stel `"homepage": "pagina-naam"` in `config.json`
3. **Flexibel**: Werkt met elk bestandstype (md, php, html)
2. **Handmatig**: Stel `"default_page": "pagina-naam"` in `config.json`
### Hoe werkt de navigatie?
- **Mappen** worden dropdown menus
- **Bestanden** worden directe links
- **Sub-mappen** worden geneste dropdowns
- **Home knop** linkt altijd naar de homepage
### Hoe voeg ik nieuwe content toe?
1. **Upload** bestanden naar de `content/` map
2. **Organiseer** in logische mappen
3. **Gebruik** juiste bestandsnamen en extensies
4. **Herlaad** de pagina om de navigatie te vernieuwen
### Kan ik custom CSS gebruiken?
Ja! Voeg custom CSS toe aan:
- **`/public/assets/css/style.css`** - Voor algemene styling
- **Template bestanden** - Voor specifieke componenten
- **Inline styles** - In content bestanden indien nodig
1. Upload bestanden naar de `content/` map
2. Organiseer in logische mappen
3. Gebruik juiste bestandsnamen en extensies
## Troubleshooting
### Pagina niet gevonden (404)
1. **Controleer** bestandsnaam en pad
2. **Controleer** bestandsextensie (.md, .php, .html)
3. **Controleer** permissies van bestanden
4. **Controleer** `config.json` syntax
### Template niet geladen
1. **Controleer** template bestandsnamen
2. **Controleer** template map permissies
3. **Controleer** PHP error logs
4. **Controleer** `templates_dir` configuratie
1. Controleer bestandsnaam en pad
2. Controleer bestandsextensie (.md, .php, .html)
3. Controleer permissies van bestanden
### Navigatie niet bijgewerkt
1. **Herlaad** de pagina
2. **Controleer** content map structuur
3. **Controleer** bestandsnamen (geen spaties)
4. **Controleer** PHP cache indien aanwezig
1. Herlaad de pagina
2. Controleer content map structuur
3. Controleer bestandsnamen (geen spaties)
## Ondersteuning
@@ -317,4 +285,4 @@ Voor technische ondersteuning:
## Licentie
CodePress CMS is open-source software. Controleer de licentie in de repository voor meer informatie.
CodePress CMS is open-source software.