mirror of
https://git.davidovski.xyz/davidovski.git
synced 2024-08-15 00:43:29 +00:00
add build and new scripts
This commit is contained in:
parent
a85890b3e6
commit
4af1486a3b
2 changed files with 19 additions and 0 deletions
6
build.sh
Normal file
6
build.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -d dist ] && rm -r dist
|
||||
mkdir dist
|
||||
|
||||
shblg -i site -o dist
|
13
new.sh
Normal file
13
new.sh
Normal 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
|
Loading…
Reference in a new issue