wiki fix
This commit is contained in:
parent
664739c5b4
commit
c19710d6bf
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue