From 021f6ace11aee47a7ba9d7381cc16b0acf50f748 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 22 Dec 2020 21:35:57 +0100 Subject: Switched from cssnano to csso, added robots.txt, changed output dir --- scripts/build_content.sh | 13 ++++++------- scripts/build_fonts.sh | 4 ++-- scripts/build_sass.sh | 3 +-- scripts/serve.sh | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/build_content.sh b/scripts/build_content.sh index e15293e..bd35694 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh @@ -4,9 +4,9 @@ SITE_TITLE="Volpeon's Den" target () { if [ "${1#*.}" = "md" ]; then - echo "dist/$(echo "${1%.md}.html" | cut -sd / -f 2-)" + echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)" else - echo "dist/$(echo "$1" | cut -sd / -f 2-)" + echo "output/$(echo "$1" | cut -sd / -f 2-)" fi } @@ -14,6 +14,7 @@ compile () { TARGET=$(target "$1") mkdir -p $(dirname "$TARGET") pandoc "$1" \ + -f markdown \ -t html5 \ --template templates/base.html \ -o "$TARGET" \ @@ -28,10 +29,8 @@ if [ -z "$1" ]; then do compile "$FILE" done +elif [ "$2" = "delete" ]; then + rm -rf $(target $1) else - if [ "$2" = "delete" ]; then - rm -rf $(target $1) - else - compile "$1" - fi + compile "$1" fi diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh index d7c5e13..145dfef 100755 --- a/scripts/build_fonts.sh +++ b/scripts/build_fonts.sh @@ -4,10 +4,10 @@ pyftsubset assets/iosevka-term-ss09-regular.ttf \ --text-file='assets/glyphs.txt' \ --layout-features+=ss09,dlig \ --flavor='woff2' \ - --output-file='dist/iosevka-term-ss09-regular.woff2' + --output-file='output/iosevka-term-ss09-regular.woff2' pyftsubset assets/iosevka-term-ss09-bold.ttf \ --text-file='assets/glyphs.txt' \ --layout-features+=ss09,dlig \ --flavor='woff2' \ - --output-file='dist/iosevka-term-ss09-bold.woff2' + --output-file='output/iosevka-term-ss09-bold.woff2' diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh index 6334acc..f972859 100755 --- a/scripts/build_sass.sh +++ b/scripts/build_sass.sh @@ -1,4 +1,3 @@ #!/bin/bash -sassc assets/style.scss dist/style.css -node_modules/.bin/postcss dist/style.css -r +sassc assets/style.scss | node_modules/.bin/csso > output/style.css diff --git a/scripts/serve.sh b/scripts/serve.sh index 10e45a4..9952373 100755 --- a/scripts/serve.sh +++ b/scripts/serve.sh @@ -1,3 +1,3 @@ #!/bin/bash -python -m http.server --bind 127.0.0.1 --directory dist +python -m http.server --bind 127.0.0.1 --directory output -- cgit v1.2.3-54-g00ecf