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
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;
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;
}
#!/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' {} \;