summaryrefslogtreecommitdiffhomepage
path: root/www/Makefile
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-02-02 13:34:47 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-11-30 21:09:29 +0800
commit9934dd538b0ce116e3b1600272cb46369b082246 (patch)
tree2f28c6c362201151eaf8218e566479ed7eb72070 /www/Makefile
init commit
Diffstat (limited to 'www/Makefile')
-rw-r--r--www/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
new file mode 100644
index 0000000..80b9d47
--- /dev/null
+++ b/www/Makefile
@@ -0,0 +1,14 @@
1.ONESHELL:
2ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
3
4# build html files for public/
5build:
6 @input_dir=~/log/posts \
7 output_dir=/srv/http \
8 assets_dir=$(ROOT_DIR)assets \
9 template_dir=$(ROOT_DIR)templates \
10 $(ROOT_DIR)scripts/build.sh
11
12# Migrage frontmatter from '---' to HTML comment '<!-- -->'
13frontmatter:
14 find content -type f -name '*.md' | xargs sed -i ':frontmatter { 1s/^---/<!--/; 1!s/^---/-->/; 1!b}; /^---/ {1b frontmatter}'