add build and new scripts

This commit is contained in:
davidovski 2023-07-21 11:12:52 +02:00
parent ce018d2193
commit a3e77b130d
2 changed files with 19 additions and 0 deletions

6
build.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
[ -d dist ] && rm -r dist
mkdir dist
shblg -i site -o dist

13
new.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
EDITOR=nvim
TEMPFILE=/tmp/blog_entry.md
$EDITOR $TEMPFILE
NAME=site/entries/$(head -1 $TEMPFILE | cut -d" " -f2- | tr " " "-" | tr "[:upper:]" "[:lower:]").html
cp $TEMPFILE "$NAME"
rm $TEMPFILE
chmod +x $NAME