update links for pretty urls
This commit is contained in:
parent
d15fccb3ab
commit
a16b452a8d
13
README.md
13
README.md
|
@ -19,5 +19,14 @@ stop by irc and say hi!
|
||||||
`<bind address="127.0.0.1" port="8081" type="httpd">`
|
`<bind address="127.0.0.1" port="8081" type="httpd">`
|
||||||
4. add gen_stats to a crontab for a user that can write in the webroot:
|
4. add gen_stats to a crontab for a user that can write in the webroot:
|
||||||
`* * * * * /var/www/tilde.chat/gen_stats`
|
`* * * * * /var/www/tilde.chat/gen_stats`
|
||||||
5. `cp blacklist{.example,}`
|
5. nginx config for pretty urls
|
||||||
6. `vim blacklist` - stats gen will fail if this is missing
|
```
|
||||||
|
location ~* ^/wiki/(.+)$ {
|
||||||
|
try_files $uri $uri/ /wiki/index.php?page=$1;
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
||||||
foreach (glob("pages/*.md") as $page) {
|
foreach (glob("pages/*.md") as $page) {
|
||||||
$yaml = $parser->parse(file_get_contents($page))->getYAML();
|
$yaml = $parser->parse(file_get_contents($page))->getYAML();
|
||||||
if (!$yaml["published"]) continue; ?>
|
if (!$yaml["published"]) continue; ?>
|
||||||
<a href="?page=<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br>
|
<a href="<?=basename($page, ".md")?>"><?=$yaml["title"]?></a><br>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user