mirror of
https://github.com/tildeclub/site.git
synced 2026-01-23 21:40:18 +00:00
start importing wiki articles from github
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user