diff --git a/README.md b/README.md index 270d661..dfcc506 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,14 @@ stop by irc and say hi! `` 4. add gen_stats to a crontab for a user that can write in the webroot: `* * * * * /var/www/tilde.chat/gen_stats` -5. `cp blacklist{.example,}` -6. `vim blacklist` - stats gen will fail if this is missing +5. nginx config for pretty urls +``` +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; + } +} +``` + diff --git a/wiki/index.php b/wiki/index.php index b58df89..3243cdd 100644 --- a/wiki/index.php +++ b/wiki/index.php @@ -44,7 +44,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) { foreach (glob("pages/*.md") as $page) { $yaml = $parser->parse(file_get_contents($page))->getYAML(); if (!$yaml["published"]) continue; ?> - ">
+ ">