start importing wiki articles from github

This commit is contained in:
root
2019-09-15 14:42:17 -04:00
parent ada1e6032c
commit f0cbce70a4
32 changed files with 995 additions and 14 deletions

View File

@@ -7,10 +7,13 @@ include __DIR__."/../header.php";
<p>here's the articles on our wiki:</p>
<ul>
<?php foreach (glob("source/*.md") as $article) {
$article = basename($article, ".md"); ?>
<li><a href="/wiki/<?=$article?>.html"><?=$article?></a></li>
<?php } ?>
<?php foreach (glob("source/*.md") as $file) {
$article = basename($file, ".md");
$title = preg_match("/title: (.*)/i", file_get_contents($file), $matches)
? $matches[1] : $article;
?>
<li><a href="/wiki/<?=$article?>.html"><?=$title?></a></li>
<?php } ?>
</ul>
<?php include __DIR__."/../footer.php";