This commit is contained in:
Anton McClure 2020-07-02 16:43:53 -04:00
parent 664739c5b4
commit c19710d6bf
No known key found for this signature in database
GPG Key ID: 95F468320CF39788
1 changed files with 6 additions and 4 deletions

View File

@ -12,13 +12,15 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<hr />
<div class="content">
<?php
<h3>Uncategorized</h3>
<ul>
foreach (array_reverse(glob("pages/*.md")) as $page) {
$yaml = $parser->parse(file_get_contents($page))->getYAML();
if (!$yaml["published"]) continue; ?>
<a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a> - <?=$yaml["date"]?><br>
<?php }
} else {
<a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br>
<?php } ?>
</ul>
<?php } else {
require_once '/var/www/tilde/server/header1.php';
$pg = $parser->parse(file_get_contents("pages/{$_GET["page"]}.md"));
$yml = $pg->getYAML();