title = $page = str_replace('/', '', $params['requestUrl']); $author = $params['config']['author']; if (file_exists('../datas/pages/' . $page . '.md')) { $pageContent = file_get_contents('../datas/pages/' . $page . '.md'); $modifiedDate = \DateTime::createFromFormat("U", filemtime('../datas/pages/' . $page . '.md')); $lastMod = $modifiedDate->format(\DateTime::ATOM); } else { $pageContent = file_get_contents('../datas/pages/404.md'); } $pageContent = RenderHtml::markdownToHtml($pageContent); require __DIR__ . '/../../template/'.$params['config']['theme'].'/page.php'; $content = ob_get_contents(); ob_end_clean(); return $content; } function title() { return ucfirst($this->title); } }