- Updated 'Powered by CodePress CMS' text to be a clickable link - Link points to https://git.noorlander.info/E.Noorlander/CodePress - Added target='_blank' and rel='noopener' for security
1.1 KiB
1.1 KiB
Agent Instructions for CodePress CMS
Build & Run
- Run Server:
php -S localhost:8080 -t public - Lint PHP:
find . -name "*.php" -exec php -l {} \; - Dependencies: No Composer/NPM required. Native PHP 8.4+ implementation.
Code Style & Conventions
- PHP Standards: Follow PSR-12. Use 4 spaces for indentation.
- Naming: Classes
PascalCase(e.g.,CodePressCMS), methodscamelCase(e.g.,renderMenu), variablescamelCase, config keyssnake_case. - Architecture:
- Core logic resides in
index.php. - Configuration in
config.php. - Public entry point is
public/index.php.
- Core logic resides in
- Content: Stored in
public/content/. Supports.md(Markdown),.php(Dynamic),.html(Static). - Templating: Simple string replacement
{{placeholder}}intemplates/layout.html. - Navigation: Auto-generated from directory structure. Folders require an index file to be clickable in breadcrumbs.
- Security: Always use
htmlspecialchars()for outputting user/content data. - Git:
mainis the clean CMS core.e.noorlandercontains personal content. Do not mix them.