CodePress/guide/nl.codepress.md
Edwin Noorlander 9c5a43c5ce 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.
2025-11-26 16:50:49 +01:00

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. en en. 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

  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 { "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.md en en.bestand.md

Templates

Template Variabelen

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
  • content - Content (HTML)
  • file_info - Bestandsinformatie
  • is_homepage - Boolean: is dit de homepage?

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

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=nl of ?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 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 "default_page": "pagina-naam" in config.json

Hoe werkt de navigatie?

  • Mappen worden dropdown menus
  • Bestanden worden directe links
  • Sub-mappen worden geneste dropdowns

Hoe voeg ik nieuwe content toe?

  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

Navigatie niet bijgewerkt

  1. Herlaad de pagina
  2. Controleer content map structuur
  3. Controleer bestandsnamen (geen spaties)

Ondersteuning

Voor technische ondersteuning:

Licentie

CodePress CMS is open-source software.