diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | scripts/build_content.sh | 9 |
2 files changed, 9 insertions, 2 deletions
| @@ -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 | ||
| 26 | build: export LIVE=false | ||
| 26 | build: compress_gz compress_br | 27 | build: compress_gz compress_br |
| 27 | 28 | ||
| 28 | watch_sass: build_only | 29 | watch_sass: build_only |
| @@ -40,6 +41,7 @@ watch_metadata: build_only | |||
| 40 | watch_filters: build_only | 41 | watch_filters: build_only |
| 41 | @scripts/watch_filters.sh | 42 | @scripts/watch_filters.sh |
| 42 | 43 | ||
| 44 | watch: export LIVE=true | ||
| 43 | watch: watch_sass watch_content watch_templates watch_metadata watch_filters | 45 | watch: watch_sass watch_content watch_templates watch_metadata watch_filters |
| 44 | 46 | ||
| 45 | serve_only: build_only | 47 | serve_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 | ||
| 181 | mdfilter="" | ||
| 182 | if [ "$LIVE" != true ]; then | ||
| 183 | mdfilter="! -name _*.md" | ||
| 184 | fi | ||
| 185 | |||
| 181 | if [ -z "$1" ]; then | 186 | if [ -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" |
