diff options
author | Volpeon <git@volpeon.ink> | 2020-12-24 15:05:32 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-24 15:05:32 +0100 |
commit | 714d8f7ff8425e4177ff6bde4d214ef75be6b1ab (patch) | |
tree | bc343dd424b14bcadef61a80bfe7d423c139445c /scripts | |
parent | Improved typography (diff) | |
download | volpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.tar.gz volpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.tar.bz2 volpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.zip |
Added header, improved SCSS structure, use metadata file instead of param, improved folder structure
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 4 | ||||
-rwxr-xr-x | scripts/build_fonts.sh | 17 | ||||
-rwxr-xr-x | scripts/build_sass.sh | 4 | ||||
-rwxr-xr-x | scripts/watch_metadata.sh | 7 |
4 files changed, 27 insertions, 5 deletions
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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | SITE_TITLE="Volpeon's Den" | ||
4 | |||
5 | target () { | 3 | target () { |
6 | if [ "${1#*.}" = "md" ]; then | 4 | if [ "${1#*.}" = "md" ]; then |
7 | echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)" | 5 | echo "output/$(echo "${1%.md}.html" | cut -sd / -f 2-)" |
@@ -22,7 +20,7 @@ handle () { | |||
22 | -t html5 \ | 20 | -t html5 \ |
23 | --template templates/base.html \ | 21 | --template templates/base.html \ |
24 | -o "$TARGET" \ | 22 | -o "$TARGET" \ |
25 | --metadata sitetitle="$SITE_TITLE" | 23 | --metadata-file metadata/metadata.json |
26 | else | 24 | else |
27 | echo "[COPY ] $1 -> $TARGET" | 25 | echo "[COPY ] $1 -> $TARGET" |
28 | 26 | ||
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 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | echo "[COMPILE] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" | ||
4 | |||
5 | pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ | ||
6 | --text-file='assets/fonts/glyphs.txt' \ | ||
7 | --layout-features+=ss09,dlig \ | ||
8 | --flavor='woff2' \ | ||
9 | --output-file='output/iosevka-term-ss09-regular.woff2' | ||
10 | |||
11 | echo "[COMPILE] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" | ||
12 | |||
13 | pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ | ||
14 | --text-file='assets/fonts/glyphs.txt' \ | ||
15 | --layout-features+=ss09,dlig \ | ||
16 | --flavor='woff2' \ | ||
17 | --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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "[COMPILE] assets/style.scss -> output/style.css" | 3 | echo "[COMPILE] assets/css/style.scss -> output/style.css" |
4 | sassc assets/style.scss | node_modules/.bin/csso > output/style.css | 4 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ | ||
4 | | while read FILENAME | ||
5 | do | ||
6 | scripts/build_content.sh | ||
7 | done | ||