fixed index.php, and added demo and template pages instead of empty linux page
This commit is contained in:
parent
1d2f440caf
commit
f7aebe7847
|
@ -40,14 +40,15 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
|||
|
||||
<hr>
|
||||
<h3>pages:</h3>
|
||||
<ul>
|
||||
|
||||
<?php
|
||||
foreach (glob("pages/*.md") as $page) {
|
||||
$yaml = $parser->parse(file_get_contents($page))->getYAML();
|
||||
if (!$yaml["published"]) continue; ?>
|
||||
<li><a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br></li>
|
||||
<li><a href="<?php echo(strtok($_SERVER["REQUEST_URI"], '?')."?page=".basename($page, ".md"));?>"><?=$yaml["title"]?></a><br></li>
|
||||
<?php }
|
||||
|
||||
echo("</ul></div>");
|
||||
} else {
|
||||
|
||||
$pg = $parser->parse(file_get_contents("pages/{$_GET["page"]}.md"));
|
||||
|
@ -73,4 +74,6 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
|||
|
||||
<?php }
|
||||
|
||||
echo("</body></html>");
|
||||
//include __DIR__.'/../footer.php';
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
author: ~jan6
|
||||
published: true
|
||||
title: demo
|
||||
description: just some examples
|
||||
category:
|
||||
- main
|
||||
- demo
|
||||
---
|
||||
|
||||
# demo
|
||||
|
||||
you write *text* in **markdown**, and can use [links](./?page=index).
|
||||
<del>lolz hahaha this suxx0rzz</del> <ins>this is nice!</ins>
|
||||
|
||||
* unordered
|
||||
* * list
|
||||
* * * shouldn't need to go deeper than 3 levels
|
||||
|
||||
0. ordered
|
||||
993. list
|
||||
141234343243214324. works with any number and order
|
||||
2. * also nested unordered lists
|
||||
0. 0. no ordering inside itself
|
||||
|
||||
* nor
|
||||
* 0. inside unordered list
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
author: ~spider
|
||||
published: true
|
||||
title: linux 101
|
||||
description: basic linux commands
|
||||
category:
|
||||
- main
|
||||
---
|
||||
|
||||
# Linux 101
|
||||
|
||||
This is a test [link](http://google.com/).
|
||||
|
||||
* I don't know
|
||||
* If this works
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
author: ~jan6
|
||||
published: true
|
||||
title: template page
|
||||
description: base new pages off of this format
|
||||
category:
|
||||
- main
|
||||
- template
|
||||
---
|
||||
|
||||
# template
|
||||
|
||||
|
||||
you write *text* in **markdown**, and can use links:
|
||||
* [wiki index](.)
|
||||
* [demo page](./?page=demo)
|
||||
> I say, this is an awesome place!
|
||||
> > Go and make more wiki pages!
|
||||
>>> (But make sure they're of quality!)
|
Loading…
Reference in New Issue