diff options
author | Volpeon <git@volpeon.ink> | 2020-12-26 09:52:34 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-26 09:52:34 +0100 |
commit | 15147ca676f7f77697889b65721540f8b8a813ab (patch) | |
tree | 563902c127d644f0f58fd26a901794c585d9c993 /scripts | |
parent | Improved CSS definitions, more fine-grained content build script (diff) | |
download | volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.tar.gz volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.tar.bz2 volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.zip |
Generate precompressed files, use variables for some nav-related values
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 12 | ||||
-rwxr-xr-x | scripts/build_fonts.sh | 4 | ||||
-rwxr-xr-x | scripts/build_sass.sh | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index 6ce857f..9623427 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -13,7 +13,7 @@ handle () { | |||
13 | mkdir -p $(dirname "$TARGET") | 13 | mkdir -p $(dirname "$TARGET") |
14 | 14 | ||
15 | if [ "${1#*.}" = "md" ]; then | 15 | if [ "${1#*.}" = "md" ]; then |
16 | echo "[COMPILE] $1 -> $TARGET" | 16 | echo "[COMPILE ] $1 -> $TARGET" |
17 | 17 | ||
18 | pandoc "$1" \ | 18 | pandoc "$1" \ |
19 | -f markdown \ | 19 | -f markdown \ |
@@ -22,7 +22,7 @@ handle () { | |||
22 | -o "$TARGET" \ | 22 | -o "$TARGET" \ |
23 | --metadata-file metadata/metadata.json | 23 | --metadata-file metadata/metadata.json |
24 | else | 24 | else |
25 | echo "[COPY ] $1 -> $TARGET" | 25 | echo "[ COPY ] $1 -> $TARGET" |
26 | 26 | ||
27 | cp "$1" "$TARGET" | 27 | cp "$1" "$TARGET" |
28 | fi | 28 | fi |
@@ -45,18 +45,18 @@ elif [ "$1" = "md" ]; then | |||
45 | done | 45 | done |
46 | elif [ "$1" = "single" ]; then | 46 | elif [ "$1" = "single" ]; then |
47 | if [ -z "$2" ]; then | 47 | if [ -z "$2" ]; then |
48 | echo "[ERROR ] \"single\" operation requires file argument" | 48 | echo "[ ERROR ] \"single\" operation requires file argument" |
49 | else | 49 | else |
50 | handle "$2" | 50 | handle "$2" |
51 | fi | 51 | fi |
52 | elif [ "$1" = "delete" ]; then | 52 | elif [ "$1" = "delete" ]; then |
53 | if [ -z "$2" ]; then | 53 | if [ -z "$2" ]; then |
54 | echo "[ERROR ] \"delete\" operation requires file argument" | 54 | echo "[ ERROR ] \"delete\" operation requires file argument" |
55 | else | 55 | else |
56 | TARGET=$(target "$2") | 56 | TARGET=$(target "$2") |
57 | echo "[DELETE ] $2 -> $TARGET" | 57 | echo "[ DELETE ] $2 -> $TARGET" |
58 | rm -rf $TARGET | 58 | rm -rf $TARGET |
59 | fi | 59 | fi |
60 | else | 60 | else |
61 | echo "[ERROR ] Unknown operation: \"$1\"" | 61 | echo "[ ERROR ] Unknown operation: \"$1\"" |
62 | fi | 62 | fi |
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh index 11c01db..d8ed9ea 100755 --- a/scripts/build_fonts.sh +++ b/scripts/build_fonts.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "[MINIFY ] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" | 3 | echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" |
4 | 4 | ||
5 | pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ | 5 | pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ |
6 | --text-file='assets/fonts/glyphs.txt' \ | 6 | --text-file='assets/fonts/glyphs.txt' \ |
@@ -8,7 +8,7 @@ pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ | |||
8 | --flavor='woff2' \ | 8 | --flavor='woff2' \ |
9 | --output-file='output/iosevka-term-ss09-regular.woff2' | 9 | --output-file='output/iosevka-term-ss09-regular.woff2' |
10 | 10 | ||
11 | echo "[MINIFY ] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" | 11 | echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" |
12 | 12 | ||
13 | pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ | 13 | pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ |
14 | --text-file='assets/fonts/glyphs.txt' \ | 14 | --text-file='assets/fonts/glyphs.txt' \ |
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh index 2e25f10..2711a89 100755 --- a/scripts/build_sass.sh +++ b/scripts/build_sass.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "[COMPILE] assets/css/style.scss -> output/style.css" | 3 | echo "[COMPILE ] assets/css/style.scss -> output/style.css" |
4 | sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css | 4 | sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css |