Add demo content and documentation for FolderWeb

Add about page with project philosophy and technical details

Add articles about Markdown, templates, and getting started

Implement demo content system that shows when no user content exists

Update logo to show FolderWeb branding

Improve Apache configuration for development environment
This commit is contained in:
Ruben 2025-11-01 16:47:15 +01:00
parent 36a3221dbb
commit 4c697122ab
19 changed files with 660 additions and 293 deletions

View file

@ -9,7 +9,20 @@ $config = parse_ini_file($configFile, true);
$defaultLang = $config['languages']['default'] ?? 'no';
$availableLangs = array_map('trim', explode(',', $config['languages']['available'] ?? 'no'));
$contentDir = realpath($_SERVER['DOCUMENT_ROOT']);
// Use user content if exists and has content, otherwise fall back to demo content
$userContentDir = $_SERVER['DOCUMENT_ROOT'];
$demoContentDir = __DIR__ . '/default/content';
// Check if user content directory has actual content (more than just . and ..)
$hasUserContent = false;
if (is_dir($userContentDir)) {
$userFiles = scandir($userContentDir) ?: [];
$userFiles = array_diff($userFiles, ['.', '..']);
$hasUserContent = count($userFiles) > 0;
}
$contentDir = $hasUserContent ? realpath($userContentDir) : realpath($demoContentDir);
$requestUri = parse_url($_SERVER['REQUEST_URI'] ?? '', PHP_URL_PATH) ?: '/';
$hasTrailingSlash = str_ends_with($requestUri, '/') && $requestUri !== '/';
$requestPath = trim($requestUri, '/');