48 lines
1.6 KiB
PHP
48 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* TekDek Documentation Site - Configuration
|
|
*
|
|
* All site-wide settings, menu structure, and content mapping.
|
|
*/
|
|
|
|
// Prevent direct access
|
|
if (!defined('TEKDEK')) {
|
|
die('Direct access not permitted.');
|
|
}
|
|
|
|
// --- Site Settings ---
|
|
define('SITE_TITLE', 'TekDek');
|
|
define('SITE_DESCRIPTION', 'Documentation & Strategy Hub');
|
|
define('SITE_BASE_URL', '/'); // Change if hosted in a subdirectory
|
|
define('SITE_VERSION', '1.0.0');
|
|
define('CONTENT_DIR', __DIR__ . '/content/');
|
|
|
|
// --- Menu Structure ---
|
|
// Each entry: slug => [title, icon (optional), show_in_nav]
|
|
$MENU = [
|
|
'home' => ['title' => 'Home', 'icon' => '🏠', 'nav' => true],
|
|
'about' => ['title' => 'About', 'icon' => '📖', 'nav' => true],
|
|
'projects' => ['title' => 'Projects', 'icon' => '🚀', 'nav' => true],
|
|
'tools' => ['title' => 'Tools', 'icon' => '🛠️', 'nav' => true],
|
|
'team' => ['title' => 'Team', 'icon' => '👥', 'nav' => true],
|
|
'decisions' => ['title' => 'Decisions', 'icon' => '✅', 'nav' => true],
|
|
];
|
|
|
|
// --- Content Mapping ---
|
|
// slug => markdown file (relative to CONTENT_DIR) or null for PHP-only pages
|
|
$CONTENT_MAP = [
|
|
'home' => null,
|
|
'about' => 'about.md',
|
|
'projects' => 'projects.md',
|
|
'tools' => 'tools.md',
|
|
'team' => null,
|
|
'decisions' => 'decisions.md',
|
|
];
|
|
|
|
// --- Page Titles (for <title> tag) ---
|
|
function page_title(string $slug): string {
|
|
global $MENU;
|
|
$page = $MENU[$slug]['title'] ?? '404';
|
|
return ($slug === 'home') ? SITE_TITLE . ' — ' . SITE_DESCRIPTION : $page . ' — ' . SITE_TITLE;
|
|
}
|