From c92ebcfee8e6b377bb1cd20ae0c28579465595aa Mon Sep 17 00:00:00 2001 From: Sebastian Bugge Date: Fri, 29 Dec 2023 18:03:51 +0100 Subject: [PATCH] Add sed to publish an article. --- deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy.sh b/deploy.sh index 6737e75..b192963 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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 rsync public/ vsbugge@navi.samfundet.no:/var/www/kaholaz.net/ -r --delete -P