From: Christian Heller Date: Sat, 25 Jun 2016 00:39:20 +0000 (+0200) Subject: Improve post-wiki setup. X-Git-Url: https://plomlompom.com/repos/condition_descriptions?a=commitdiff_plain;h=7cb0ae2deda0b59db7822947b9d98eae3fb6d425;p=config Improve post-wiki setup. --- diff --git a/jessie_postinstall.sh b/jessie_postinstall.sh index efe7bb2..6a5af27 100755 --- a/jessie_postinstall.sh +++ b/jessie_postinstall.sh @@ -266,7 +266,7 @@ if [ "$1" = "server" ]; then su - plom -c 'git init --bare /home/plom/lifelog.git' su - plom -c 'cp ~/config/systemfiles/post-update ~/lifelog.git/hooks/' su - plom -c 'chmod a+x /home/plom/lifelog.git/hooks/post-update' - apt-get -y isntall python3-docutils + apt-get -y install pandoc fi elif [ "$1" = "thinkpad" ]; then diff --git a/systemfiles/nginx.conf b/systemfiles/nginx.conf index 4bb06e5..b9f1005 100644 --- a/systemfiles/nginx.conf +++ b/systemfiles/nginx.conf @@ -12,8 +12,7 @@ http { text/html html htm shtml; text/css css; text/xml xml; - text/plain txt; - text/plain sh; + text/plain txt sh rst; application/xhtml+xml xhtml; application/pdf pdf; image/jpeg jpg jpeg; @@ -39,6 +38,7 @@ http { ssl_certificate /etc/letsencrypt/live/dump.plomlompom.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/dump.plomlompom.com/privkey.pem; root /var/www/html/; + rewrite ^(/lifelog/(.*/)*[^./]+)$ $1.html; location /lifelog/ { autoindex on; } diff --git a/systemfiles/post-update b/systemfiles/post-update index 325d94f..51742fb 100755 --- a/systemfiles/post-update +++ b/systemfiles/post-update @@ -1,4 +1,4 @@ #!/bin/sh LIFELOGDIR=/home/plom/lifelog GIT_WORK_TREE=$LIFELOGDIR git checkout -f -find $LIFELOGDIR -name "*.rst" -exec sh -c 'rst2html $0 > ${0%.rst}.html' {} \; +find $LIFELOGDIR -name "*.rst" -type f -exec sh -c 'pandoc -s -f rst --mathml -t html5 $0 > ${0%.rst}.html' {} \;