Add sed to publish an article.

This commit is contained in:
Sebastian Bugge 2023-12-29 18:03:51 +01:00
parent 7ba4c32725
commit c92ebcfee8
Signed by: kaholaz
GPG key ID: 2EFFEDEE03519691

View file

@ -1,2 +1,5 @@
if [ -n "$1" ]; then
sed -i -E 's/(draft: )true/\1false/; s/(date: ).*/\1'$(date '+%Y-%m-%dT%T%z')'/' content/posts/$1.md
fi
hugo || exit hugo || exit
rsync public/ vsbugge@navi.samfundet.no:/var/www/kaholaz.net/ -r --delete -P rsync public/ vsbugge@navi.samfundet.no:/var/www/kaholaz.net/ -r --delete -P