summaryrefslogtreecommitdiffstats
path: root/scripts
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
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')
-rwxr-xr-xscripts/build_content.sh8
-rwxr-xr-xscripts/build_fonts.sh13
-rwxr-xr-xscripts/build_sass.sh4
-rwxr-xr-xscripts/serve.sh3
-rwxr-xr-xscripts/watch_content.sh5
-rwxr-xr-xscripts/watch_sass.sh5
6 files changed, 38 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" \;
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh
new file mode 100755
index 0000000..d7c5e13
--- /dev/null
+++ b/scripts/build_fonts.sh
@@ -0,0 +1,13 @@
1#!/bin/bash
2
3pyftsubset assets/iosevka-term-ss09-regular.ttf \
4 --text-file='assets/glyphs.txt' \
5 --layout-features+=ss09,dlig \
6 --flavor='woff2' \
7 --output-file='dist/iosevka-term-ss09-regular.woff2'
8
9pyftsubset assets/iosevka-term-ss09-bold.ttf \
10 --text-file='assets/glyphs.txt' \
11 --layout-features+=ss09,dlig \
12 --flavor='woff2' \
13 --output-file='dist/iosevka-term-ss09-bold.woff2'
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh
new file mode 100755
index 0000000..6334acc
--- /dev/null
+++ b/scripts/build_sass.sh
@@ -0,0 +1,4 @@
1#!/bin/bash
2
3sassc assets/style.scss dist/style.css
4node_modules/.bin/postcss dist/style.css -r
diff --git a/scripts/serve.sh b/scripts/serve.sh
new file mode 100755
index 0000000..10e45a4
--- /dev/null
+++ b/scripts/serve.sh
@@ -0,0 +1,3 @@
1#!/bin/bash
2
3python -m http.server --bind 127.0.0.1 --directory dist
diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh
new file mode 100755
index 0000000..59d60a4
--- /dev/null
+++ b/scripts/watch_content.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2
3while inotifywait -r -e close_write content; do
4 scripts/build_content.sh
5done
diff --git a/scripts/watch_sass.sh b/scripts/watch_sass.sh
new file mode 100755
index 0000000..69605dc
--- /dev/null
+++ b/scripts/watch_sass.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2
3while inotifywait -r -e close_write assets; do
4 scripts/build_sass.sh
5done