Change URLs for /news to be SEO-friendly
This commit is contained in:
parent
f34b57ab35
commit
183b028998
|
@ -73,7 +73,7 @@ $parser = Tildeverse\Wiki\Parser::factory();
|
|||
<div class="list-group-item">
|
||||
<h3 class="list-group-item-heading"><?=$yaml["title"]?></h3>
|
||||
<em>
|
||||
<a href="/news/?page=<?=basename($page, ".md")?>">
|
||||
<a href="/news/<?=basename($page, ".md")?>">
|
||||
<?=$yaml["date"]?></a> - <a href="/~<?=$yaml["author"]?>/"><?=$yaml["author"]?></a>
|
||||
</em>
|
||||
<hr>
|
||||
|
|
|
@ -44,7 +44,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
|||
foreach (array_reverse(glob("pages/*.md")) as $page) {
|
||||
$yaml = $parser->parse(file_get_contents($page))->getYAML();
|
||||
if (!$yaml["published"]) continue; ?>
|
||||
<a href="?page=<?=basename($page, ".md")?>"><?=$yaml["title"]?></a> - <?=$yaml["date"]?><br>
|
||||
<a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a> - <?=$yaml["date"]?><br>
|
||||
<?php }
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue