From a788c0f520afc923cc291693705f44f52c2a3b2e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 14 Jan 2021 20:29:23 +0100 Subject: Compile drafts in watch/serve mode --- scripts/build_content.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') 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 () { fi } +mdfilter="" +if [ "$LIVE" != true ]; then + mdfilter="! -name _*.md" +fi + if [ -z "$1" ]; then find "$CONTENT_DIR" \ -type f \ - ! -name "_*.md" \ + $mdfilter \ | while read file_in do handle "$file_in" @@ -190,7 +195,7 @@ elif [ "$1" = "all_md" ]; then find "$CONTENT_DIR" \ -type f \ -name "*.md" \ - ! -name "_*.md" \ + $mdfilter \ | while read file_in do handle "$file_in" -- cgit v1.2.3-54-g00ecf