- 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.
6.6 KiB
CodePress CMS Handleiding
Overzicht
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
- Automatische menu generatie
- Responsive design
- Breadcrumb navigatie
- Active state marking
📄 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.enen.prefix
🔍 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
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 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
- Upload bestanden naar webserver
- Stel permissies in voor webserver
- Configureer
config.jsonindien nodig - Toegang tot website via browser
Configuratie
Basis Configuratie (config.json)
```json { "site_title": "CodePress", "content_dir": "content", "templates_dir": "engine/templates", "default_page": "auto", "language": { "default": "nl", "available": ["nl", "en"] }, "theme": { "header_color": "#0a369d", "header_font_color": "#ffffff", "navigation_color": "#2754b4", "navigation_font_color": "#ffffff", "sidebar_background": "#f8f9fa", "sidebar_border": "#dee2e6" }, "author": { "name": "E. Noorlander", "website": "https://noorlander.info" }, "seo": { "description": "CodePress CMS - Lightweight file-based content management system", "keywords": "cms, php, content management, file-based" }, "features": { "auto_link_pages": true, "search_enabled": true, "breadcrumbs_enabled": true } } ```
Content Structuur
Bestandsstructuur
``` content/ ├── map1/ │ ├── submap1/ │ │ ├── pagina1.md │ │ └── pagina2.php │ └── pagina3.html ├── map2/ │ └── pagina4.md ├── homepage.md └── index.html ```
Bestandsnamen
- Gebruik lowercase bestandsnamen
- Geen spaties - gebruik
-of_ - Logische extensies -
.md,.php,.html - Unieke namen - geen duplicaten
- Language prefixes -
nl.bestand.mdenen.bestand.md
Templates
Template Variabelen
Site Info
site_title- Website titelauthor_name- Auteur naamauthor_website- Auteur websiteauthor_git- Git repository link
Page Info
page_title- Pagina titelcontent- Content (HTML)file_info- Bestandsinformatieis_homepage- Boolean: is dit de homepage?
Navigation
menu- Navigatie menubreadcrumb- Breadcrumb navigatiehomepage- Homepage link
Theme
header_color- Header achtergrondkleurheader_font_color- Header tekstkleurnavigation_color- Navigatie achtergrondkleurnavigation_font_color- Navigatie tekstkleur
Language
current_lang- Huidige taal (nl/en)current_lang_upper- Huidige taal (NL/EN)t_*- Vertaalde strings
URL Structuur
Basis URLs
- Home:
/of?page=home - Pagina:
?page=map/pagina - Zoeken:
?search=zoekterm - Handleiding:
?guide - Language:
?lang=nlof?lang=en
SEO Optimalisatie
Meta Tags
De CMS voegt automatisch meta tags toe: ```html
\`\`\`🔌 Plugin Systeem
Plugin Structuur
``` plugins/ ├── README.md ├── HTMLBlock/ │ ├── HTMLBlock.php │ └── README.md └── MQTTTracker/ ├── MQTTTracker.php ├── config.json └── README.md ```
Plugin Development
- API toegang via
CMSAPIclass - 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 sidebarcontent-sidebar- Content links, sidebar rechtscontent-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?
- Automatisch: Laat de CMS het eerste bestand kiezen
- Handmatig: Stel
"default_page": "pagina-naam"inconfig.json
Hoe werkt de navigatie?
- Mappen worden dropdown menus
- Bestanden worden directe links
- Sub-mappen worden geneste dropdowns
Hoe voeg ik nieuwe content toe?
- Upload bestanden naar de
content/map - Organiseer in logische mappen
- Gebruik juiste bestandsnamen en extensies
Troubleshooting
Pagina niet gevonden (404)
- Controleer bestandsnaam en pad
- Controleer bestandsextensie (.md, .php, .html)
- Controleer permissies van bestanden
Navigatie niet bijgewerkt
- Herlaad de pagina
- Controleer content map structuur
- Controleer bestandsnamen (geen spaties)
Ondersteuning
Voor technische ondersteuning:
- GitHub: https://git.noorlander.info/E.Noorlander/CodePress.git
- Website: https://noorlander.info
- Issues: Rapporteer problemen via GitHub issues
Licentie
CodePress CMS is open-source software.