summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_content.sh4
-rwxr-xr-xscripts/build_fonts.sh17
-rwxr-xr-xscripts/build_sass.sh4
-rwxr-xr-xscripts/watch_metadata.sh7
4 files changed, 27 insertions, 5 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
index 0698ee0..ca75120 100755
--- a/scripts/build_content.sh
+++ b/scripts/build_content.sh
@@ -1,7 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2 2
3SITE_TITLE="Volpeon's Den"
4
5target () { 3target () {
6 if [ "${1#*.}" = "md" ]; then 4 if [ "${1#*.}" = "md" ]; then
7 echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)" 5 echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)"
@@ -22,7 +20,7 @@ handle () {
22 -t html5 \ 20 -t html5 \
23 --template templates/base.html \ 21 --template templates/base.html \
24 -o "$TARGET" \ 22 -o "$TARGET" \
25 --metadata sitetitle="$SITE_TITLE" 23 --metadata-file metadata/metadata.json
26 else 24 else
27 echo "[COPY ] $1 -> $TARGET" 25 echo "[COPY ] $1 -> $TARGET"
28 26
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh
new file mode 100755
index 0000000..8c795ec
--- /dev/null
+++ b/scripts/build_fonts.sh
@@ -0,0 +1,17 @@
1#!/bin/bash
2
3echo "[COMPILE] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2"
4
5pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \
6 --text-file='assets/fonts/glyphs.txt' \
7 --layout-features+=ss09,dlig \
8 --flavor='woff2' \
9 --output-file='output/iosevka-term-ss09-regular.woff2'
10
11echo "[COMPILE] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2"
12
13pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \
14 --text-file='assets/fonts/glyphs.txt' \
15 --layout-features+=ss09,dlig \
16 --flavor='woff2' \
17 --output-file='output/iosevka-term-ss09-bold.woff2'
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh
index a6d9c93..2e25f10 100755
--- a/scripts/build_sass.sh
+++ b/scripts/build_sass.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/bash
2 2
3echo "[COMPILE] assets/style.scss -> output/style.css" 3echo "[COMPILE] assets/css/style.scss -> output/style.css"
4sassc assets/style.scss | node_modules/.bin/csso > output/style.css 4sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css
diff --git a/scripts/watch_metadata.sh b/scripts/watch_metadata.sh
new file mode 100755
index 0000000..af2e6a7
--- /dev/null
+++ b/scripts/watch_metadata.sh
@@ -0,0 +1,7 @@
1#!/bin/bash
2
3inotifywait -qrme close_write,delete,move --format "%w%f" metadata \
4 | while read FILENAME
5 do
6 scripts/build_content.sh
7 done