From 714d8f7ff8425e4177ff6bde4d214ef75be6b1ab Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 24 Dec 2020 15:05:32 +0100 Subject: Added header, improved SCSS structure, use metadata file instead of param, improved folder structure --- scripts/build_content.sh | 4 +--- scripts/build_fonts.sh | 17 +++++++++++++++++ scripts/build_sass.sh | 4 ++-- scripts/watch_metadata.sh | 7 +++++++ 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100755 scripts/build_fonts.sh create mode 100755 scripts/watch_metadata.sh (limited to 'scripts') 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 @@ #!/bin/bash -SITE_TITLE="Volpeon's Den" - target () { if [ "${1#*.}" = "md" ]; then echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)" @@ -22,7 +20,7 @@ handle () { -t html5 \ --template templates/base.html \ -o "$TARGET" \ - --metadata sitetitle="$SITE_TITLE" + --metadata-file metadata/metadata.json else echo "[COPY ] $1 -> $TARGET" 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 @@ +#!/bin/bash + +echo "[COMPILE] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" + +pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ + --text-file='assets/fonts/glyphs.txt' \ + --layout-features+=ss09,dlig \ + --flavor='woff2' \ + --output-file='output/iosevka-term-ss09-regular.woff2' + +echo "[COMPILE] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" + +pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ + --text-file='assets/fonts/glyphs.txt' \ + --layout-features+=ss09,dlig \ + --flavor='woff2' \ + --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 @@ #!/bin/bash -echo "[COMPILE] assets/style.scss -> output/style.css" -sassc assets/style.scss | node_modules/.bin/csso > output/style.css +echo "[COMPILE] assets/css/style.scss -> output/style.css" +sassc 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 @@ +#!/bin/bash + +inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ + | while read FILENAME + do + scripts/build_content.sh + done -- cgit v1.2.3-70-g09d2