summaryrefslogtreecommitdiffstats
path: root/scripts/build_content.sh
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2020-12-21 21:16:43 +0100
committerVolpeon <git@volpeon.ink>2020-12-21 21:16:43 +0100
commitfe48bee6e9d409704bc09b1ae5527e2de1115fc8 (patch)
treea61a373ee1461f72d5e866ebac7074941bf1d08b /scripts/build_content.sh
parentUse Pandoc to write content in Markdown (diff)
downloadvolpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.tar.gz
volpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.tar.bz2
volpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.zip
Added makefile
Diffstat (limited to 'scripts/build_content.sh')
-rwxr-xr-xscripts/build_content.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
new file mode 100755
index 0000000..4476d45
--- /dev/null
+++ b/scripts/build_content.sh
@@ -0,0 +1,8 @@
1#!/bin/bash
2
3SITE_TITLE="Volpeon's Den"
4
5find content/ \
6 -iname "*.md" \
7 -type f \
8 -exec sh -c 'TARGET=dist/$(echo ${0%.md}.html | cut -sd / -f 2-); mkdir -p $(dirname $TARGET) && pandoc "${0}" -t html5 --template templates/base.html -o "$TARGET" --metadata sitetitle="$1"' {} "$SITE_TITLE" \;