Refactor template and content handling logic

Add constants for file extensions

Extract helper functions for common operations

Improve PDF file detection

Simplify directory scanning operations

Standardize template resolution

Optimize content rendering pipeline
This commit is contained in:
Ruben 2025-11-01 22:54:42 +01:00
parent 149ba03359
commit 32449d2edd
6 changed files with 98 additions and 145 deletions

7
app/constants.php Normal file
View file

@ -0,0 +1,7 @@
<?php
// Content file extensions
define('CONTENT_EXTENSIONS', ['md', 'html', 'php']);
// Cover image extensions
define('COVER_IMAGE_EXTENSIONS', ['jpg', 'jpeg', 'png', 'webp', 'gif']);