diff options
author | Volpeon <git@volpeon.ink> | 2020-12-21 21:16:43 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-21 21:16:43 +0100 |
commit | fe48bee6e9d409704bc09b1ae5527e2de1115fc8 (patch) | |
tree | a61a373ee1461f72d5e866ebac7074941bf1d08b /scripts | |
parent | Use Pandoc to write content in Markdown (diff) | |
download | volpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.tar.gz volpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.tar.bz2 volpeon.ink-fe48bee6e9d409704bc09b1ae5527e2de1115fc8.zip |
Added makefile
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 8 | ||||
-rwxr-xr-x | scripts/build_fonts.sh | 13 | ||||
-rwxr-xr-x | scripts/build_sass.sh | 4 | ||||
-rwxr-xr-x | scripts/serve.sh | 3 | ||||
-rwxr-xr-x | scripts/watch_content.sh | 5 | ||||
-rwxr-xr-x | scripts/watch_sass.sh | 5 |
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 | |||
3 | SITE_TITLE="Volpeon's Den" | ||
4 | |||
5 | find 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 | |||
3 | pyftsubset 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 | |||
9 | pyftsubset 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 | |||
3 | sassc assets/style.scss dist/style.css | ||
4 | node_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 | |||
3 | python -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 | |||
3 | while inotifywait -r -e close_write content; do | ||
4 | scripts/build_content.sh | ||
5 | done | ||
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 | |||
3 | while inotifywait -r -e close_write assets; do | ||
4 | scripts/build_sass.sh | ||
5 | done | ||