summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-01-14 20:29:23 +0100
committerVolpeon <git@volpeon.ink>2021-01-14 20:29:23 +0100
commita788c0f520afc923cc291693705f44f52c2a3b2e (patch)
treeacfc447c0a247ef2c04f81d6f25c8ce7325586e1
parentShow secret footer, add link meta tag to feed for owning page, finished home ... (diff)
downloadvolpeon.ink-a788c0f520afc923cc291693705f44f52c2a3b2e.tar.gz
volpeon.ink-a788c0f520afc923cc291693705f44f52c2a3b2e.tar.bz2
volpeon.ink-a788c0f520afc923cc291693705f44f52c2a3b2e.zip
Compile drafts in watch/serve mode
-rw-r--r--Makefile2
-rwxr-xr-xscripts/build_content.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a72a148..db7db81 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ compress_br: build_only
23 @echo -e "\033[0;32m[COMPRESS]\033[0m Brotli" 23 @echo -e "\033[0;32m[COMPRESS]\033[0m Brotli"
24 @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` 24 @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'`
25 25
26build: export LIVE=false
26build: compress_gz compress_br 27build: compress_gz compress_br
27 28
28watch_sass: build_only 29watch_sass: build_only
@@ -40,6 +41,7 @@ watch_metadata: build_only
40watch_filters: build_only 41watch_filters: build_only
41 @scripts/watch_filters.sh 42 @scripts/watch_filters.sh
42 43
44watch: export LIVE=true
43watch: watch_sass watch_content watch_templates watch_metadata watch_filters 45watch: watch_sass watch_content watch_templates watch_metadata watch_filters
44 46
45serve_only: build_only 47serve_only: build_only
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
index 97f57a3..41c2a4b 100755
--- a/scripts/build_content.sh
+++ b/scripts/build_content.sh
@@ -178,10 +178,15 @@ handle () {
178 fi 178 fi
179} 179}
180 180
181mdfilter=""
182if [ "$LIVE" != true ]; then
183 mdfilter="! -name _*.md"
184fi
185
181if [ -z "$1" ]; then 186if [ -z "$1" ]; then
182 find "$CONTENT_DIR" \ 187 find "$CONTENT_DIR" \
183 -type f \ 188 -type f \
184 ! -name "_*.md" \ 189 $mdfilter \
185 | while read file_in 190 | while read file_in
186 do 191 do
187 handle "$file_in" 192 handle "$file_in"
@@ -190,7 +195,7 @@ elif [ "$1" = "all_md" ]; then
190 find "$CONTENT_DIR" \ 195 find "$CONTENT_DIR" \
191 -type f \ 196 -type f \
192 -name "*.md" \ 197 -name "*.md" \
193 ! -name "_*.md" \ 198 $mdfilter \
194 | while read file_in 199 | while read file_in
195 do 200 do
196 handle "$file_in" 201 handle "$file_in"