summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2020-12-22 21:35:57 +0100
committerVolpeon <git@volpeon.ink>2020-12-22 21:35:57 +0100
commit021f6ace11aee47a7ba9d7381cc16b0acf50f748 (patch)
treeba098a9046a0d0e0262d027492e9460b2c5ad8de /scripts
parentAdded deploy command to makefile (diff)
downloadvolpeon.ink-021f6ace11aee47a7ba9d7381cc16b0acf50f748.tar.gz
volpeon.ink-021f6ace11aee47a7ba9d7381cc16b0acf50f748.tar.bz2
volpeon.ink-021f6ace11aee47a7ba9d7381cc16b0acf50f748.zip
Switched from cssnano to csso, added robots.txt, changed output dir
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_content.sh13
-rwxr-xr-xscripts/build_fonts.sh4
-rwxr-xr-xscripts/build_sass.sh3
-rwxr-xr-xscripts/serve.sh2
4 files changed, 10 insertions, 12 deletions
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"
4 4
5target () { 5target () {
6 if [ "${1#*.}" = "md" ]; then 6 if [ "${1#*.}" = "md" ]; then
7 echo "dist/$(echo "${1%.md}.html" | cut -sd / -f 2-)" 7 echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)"
8 else 8 else
9 echo "dist/$(echo "$1" | cut -sd / -f 2-)" 9 echo "output/$(echo "$1" | cut -sd / -f 2-)"
10 fi 10 fi
11} 11}
12 12
@@ -14,6 +14,7 @@ compile () {
14 TARGET=$(target "$1") 14 TARGET=$(target "$1")
15 mkdir -p $(dirname "$TARGET") 15 mkdir -p $(dirname "$TARGET")
16 pandoc "$1" \ 16 pandoc "$1" \
17 -f markdown \
17 -t html5 \ 18 -t html5 \
18 --template templates/base.html \ 19 --template templates/base.html \
19 -o "$TARGET" \ 20 -o "$TARGET" \
@@ -28,10 +29,8 @@ if [ -z "$1" ]; then
28 do 29 do
29 compile "$FILE" 30 compile "$FILE"
30 done 31 done
32elif [ "$2" = "delete" ]; then
33 rm -rf $(target $1)
31else 34else
32 if [ "$2" = "delete" ]; then 35 compile "$1"
33 rm -rf $(target $1)
34 else
35 compile "$1"
36 fi
37fi 36fi
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 \
4 --text-file='assets/glyphs.txt' \ 4 --text-file='assets/glyphs.txt' \
5 --layout-features+=ss09,dlig \ 5 --layout-features+=ss09,dlig \
6 --flavor='woff2' \ 6 --flavor='woff2' \
7 --output-file='dist/iosevka-term-ss09-regular.woff2' 7 --output-file='output/iosevka-term-ss09-regular.woff2'
8 8
9pyftsubset assets/iosevka-term-ss09-bold.ttf \ 9pyftsubset assets/iosevka-term-ss09-bold.ttf \
10 --text-file='assets/glyphs.txt' \ 10 --text-file='assets/glyphs.txt' \
11 --layout-features+=ss09,dlig \ 11 --layout-features+=ss09,dlig \
12 --flavor='woff2' \ 12 --flavor='woff2' \
13 --output-file='dist/iosevka-term-ss09-bold.woff2' 13 --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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3sassc assets/style.scss dist/style.css 3sassc assets/style.scss | node_modules/.bin/csso > output/style.css
4node_modules/.bin/postcss dist/style.css -r
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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3python -m http.server --bind 127.0.0.1 --directory dist 3python -m http.server --bind 127.0.0.1 --directory output