summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-07-02 18:14:06 +0300
committereug-vs <eug-vs@keemail.me>2021-07-02 18:14:06 +0300
commite0c6ef2e6bc55fb9019fd090c544f22e46cf90ad (patch)
treeacc8d164de986dfefd6203cbe5b55ea846b3eca1
parent96854b42512e1b58d8637e15c55e50bba679f503 (diff)
downloadeug-vs-xyz-e0c6ef2e6bc55fb9019fd090c544f22e46cf90ad.tar.gz
feat: update scripts
-rwxr-xr-xconvert.sh5
-rwxr-xr-xdeploy.sh3
2 files changed, 7 insertions, 1 deletions
diff --git a/convert.sh b/convert.sh
new file mode 100755
index 0000000..fdf78e5
--- /dev/null
+++ b/convert.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo Writing to ${1%.*}.html
+cat "$1" \
+ | sed 's/.md)/.html)/g' \
+ | pandoc -s --from=gfm --to=html -c /style.css -B header.html -H icon.html -M pagetitle="Eugene's Space" --shift-heading-level-by=1 > ${1%.*}.html
diff --git a/deploy.sh b/deploy.sh
index 49e94d8..704bcf8 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,3 +1,4 @@
#!/bin/sh
-rsync -zarv --exclude=".git" . root@eug-vs.xyz:/var/www/website
+find . -type f -name '*.md' -exec ./convert.sh {} \;
+rsync -zarv --exclude=".git" --exclude="*.md" . root@eug-vs.xyz:/var/www/website