mirror of
https://github.com/tildeclub/site.git
synced 2026-10-24 12:07:14 +00:00
start importing wiki articles from github
This commit is contained in:
1 parent
ada1e6032c
commit
f0cbce70a4
32 files changed
+995
-14
No files matched your search
+7
-4
@@ -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