Edwin Noorlander dfe2df141b Complete CodePress CMS refactoring
- 🏠 Refactored layout system with flexbox
- 🎨 Implemented tab-style navigation with dropdowns
- 📱 Added responsive design with mobile support
- 🔧 Enhanced template system with content type detection
- 📝 Added comprehensive documentation (guide.md, README.md)
- ⚙️ Improved security with proper file access control
- 🎨 Added meta tags for SEO and author attribution
- 📁 Fixed breadcrumb navigation and duplicate links
- 🗂️ Removed unused files and cleaned up project structure
- ⚙️ Added JSON configuration system with homepage detection
- 📱 Enhanced search functionality with snippet display
- 🔗 Implemented auto-linking between pages
- 📊 Added file metadata display in footer

Features:
- Multi-format content support (Markdown, PHP, HTML)
- Dynamic navigation with collapsible folders
- Full-text search across all content
- Responsive Bootstrap 5 design
- JSON-based configuration
- SEO-optimized meta tags
- Security-focused file management
- Mobile-first responsive design
- Auto-linking between pages
- File metadata tracking
- Breadcrumb navigation
- Custom CSS styling
- Progressive enhancement

Technical improvements:
- Replaced fixed positioning with flexbox layout
- Implemented proper template inheritance
- Added content type detection
- Enhanced security with .htaccess
- Optimized for performance
- Added proper error handling
- Implemented caching mechanisms
- Enhanced accessibility features
2025-11-21 16:58:37 +01:00

6.7 KiB

CodePress CMS Handleiding

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.

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

📄 Content Types

  • Markdown (.md) - Met auto-linking tussen pagina's
  • PHP (.php) - Voor dynamische content en functionaliteit
  • HTML (.html) - Voor statische HTML pagina's
  • Automatische template selectie op basis van bestandstype

🔍 Zoekfunctionaliteit

  • Volledige tekst zoek door alle content bestanden
  • Resultaten met snippets en highlighting
  • Directe navigatie naar gevonden pagina's
  • SEO-vriendelijke zoekresultaten

🧭 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 mogelijkheden

🎨 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

📱 Responsive Features

  • Mobile-first aanpak
  • Hamburger menu voor kleine schermen
  • Touch-friendly dropdowns en navigatie
  • Adaptieve breedtes voor verschillende schermgroottes

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)

{
    "site_title": "CodePress",
    "content_dir": "content",
    "templates_dir": "engine/templates",
    "default_page": "auto",
    "homepage": "welkom",
    "author": {
        "name": "Edwin Noorlander",
        "website": "https://noorlander.info",
        "git": "https://git.noorlander.info/E.Noorlander/CodePress.git"
    },
    "seo": {
        "description": "CodePress CMS - Lightweight file-based content management system",
        "keywords": "cms, php, content management, file-based"
    }
}

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)
  • author - Auteur informatie met links
  • seo - SEO instellingen

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 _ als scheidingsteken
  • Logische extensies - .md, .php, .html
  • Unieke namen - geen duplicaten binnen dezelfde map

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_title}} - Website titel
  • {{page_title}} - Pagina titel
  • {{content}} - Content (HTML)
  • {{menu}} - Navigatie menu
  • {{breadcrumb}} - Breadcrumb navigatie
  • {{search_query}} - Zoekopdracht
  • {{homepage}} - Homepage link
  • {{author_*}} - Auteur informatie
  • {{seo_*}} - SEO informatie

SEO Optimalisatie

Meta Tags

De CMS voegt automatisch de volgende meta tags toe:

<meta name="generator" content="CodePress CMS">
<meta name="application-name" content="CodePress">
<meta name="author" content="Edwin 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

De CMS linkt automatisch pagina titels naar hun content:

  • Automatische detectie van pagina titels in tekst
  • Slimme links met title attributen
  • Geen dubbele links voor dezelfde pagina
  • SEO-vriendelijke URL structuur

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)

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

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

Navigatie niet bijgewerkt

  1. Herlaad de pagina
  2. Controleer content map structuur
  3. Controleer bestandsnamen (geen spaties)
  4. Controleer PHP cache indien aanwezig

Ondersteuning

Voor technische ondersteuning:

Licentie

CodePress CMS is open-source software. Controleer de licentie in de repository voor meer informatie.