diff options
author | Volpeon <git@volpeon.ink> | 2020-12-22 21:35:57 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-22 21:35:57 +0100 |
commit | 021f6ace11aee47a7ba9d7381cc16b0acf50f748 (patch) | |
tree | ba098a9046a0d0e0262d027492e9460b2c5ad8de /scripts/build_content.sh | |
parent | Added deploy command to makefile (diff) | |
download | volpeon.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/build_content.sh')
-rwxr-xr-x | scripts/build_content.sh | 13 |
1 files changed, 6 insertions, 7 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 | ||
5 | target () { | 5 | target () { |
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 |
32 | elif [ "$2" = "delete" ]; then | ||
33 | rm -rf $(target $1) | ||
31 | else | 34 | else |
32 | if [ "$2" = "delete" ]; then | 35 | compile "$1" |
33 | rm -rf $(target $1) | ||
34 | else | ||
35 | compile "$1" | ||
36 | fi | ||
37 | fi | 36 | fi |