simple_blog/common/php/index.php
manfromhuh fb1c649580 Update index.php to use the function
Also seperates the HTML used for just articles from the Markdown parsing.
2022-07-17 17:50:02 -04:00

15 lines
659 B
PHP

<?php
//The common file used to render pages on the blog.
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
//Looks for an article.md to see if the current directory is an article or not
//If it is not then it is a menu page.
if (file_exists('article.md')){
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/article.php');
} else {
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/h1_month.php');
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/page_menu.php');
}
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
?>