# Welcome to CodePress CMS CodePress is a lightweight, file-based Content Management System built with PHP and Bootstrap. This guide will help you get started with creating your own content structure. ## Quick Start 1. **Create your content structure** in `public/content/` 2. **Use Markdown (.md), PHP (.php), or HTML (.html) files** 3. **Navigate** using the automatically generated menu 4. **Search** through your content with the built-in search functionality ## Content Structure ### Basic Structure ``` public/content/ ├── home.md # Homepage ├── about/ │ └── company.md # About page ├── blog/ │ ├── index.md # Blog overview │ ├── tech/ │ │ ├── first-post.md │ │ └── second-post.md │ └── personal/ │ └── my-story.md └── projects/ ├── web-design.md └── mobile-app.md ``` ### File Types Supported #### Markdown Files (.md) ```markdown # Page Title This is the content of your page. ## Subheading **Bold text** and *italic text* are supported. [Link to other page](?page=blog/tech/first-post) ``` #### PHP Files (.php) ```php

Dynamic Content

Current time:

``` #### HTML Files (.html) ```html

Static HTML Page

This is a static HTML page with full control over the markup.

Custom HTML content here
``` ## Features ### 🎯 Core Features - **File-based content** - No database required - **Multi-format support** - Markdown, PHP, HTML - **Dynamic navigation** - Auto-generated from directory structure - **Search functionality** - Full-text search with snippets - **Breadcrumb navigation** - Clear page hierarchy - **Responsive design** - Works on all devices ### 🔧 Advanced Features - **Collapsible folders** - Accordion-style navigation - **WCAG compliant** - Accessible design with proper contrast - **File metadata** - Creation and modification dates in footer - **Progressive styling** - Visual hierarchy with nested levels - **Security** - Protected PHP files and sensitive directories ## Configuration Edit `config.php` to customize your CMS: ```php return [ 'site_title' => 'Your Site Name', 'site_description' => 'Your site description', 'content_dir' => __DIR__ . '/public/content', 'default_page' => 'home', 'markdown_enabled' => true, 'php_enabled' => true, ]; ``` ## Navigation The navigation is automatically generated from your directory structure: - **Folders** become collapsible sections - **Files** become menu items - **Empty folders** are shown as disabled - **Active pages** are highlighted - **Nested structure** supports unlimited depth ## Search The built-in search functionality: - Searches through all content files - Shows matching snippets - Highlights file paths - Supports title and content matching ## Security CodePress includes built-in security: - **.htaccess protection** for sensitive files - **PHP file blocking** in content directory - **Security headers** for XSS protection - **Directory access control** ## Best Practices ### Content Organization - Use descriptive folder names - Keep file names simple and URL-friendly - Organize content logically by topic - Use consistent naming conventions ### File Types - Use **Markdown** for simple content pages - Use **PHP** for dynamic content with server-side logic - Use **HTML** for complex layouts or static pages ### SEO Considerations - Use descriptive page titles (first H1 in content) - Create meaningful folder structures - Use internal links between related content - Keep content updated regularly ## Troubleshooting ### Common Issues **Content not showing?** - Check file permissions - Verify file extensions (.md, .php, .html) - Check config.php paths **Links not working?** - Ensure correct URL format: `?page=path/to/file` - Check file exists in content directory - Verify case sensitivity **Search not finding content?** - Check file encoding (UTF-8 recommended) - Verify content is not empty - Check search query spelling ## Getting Help - **Documentation**: Check this guide first - **Issues**: Report bugs on GitLab - **Community**: Join our discussions --- **Happy content management with CodePress!** 🚀