summaryrefslogtreecommitdiffhomepage
path: root/www/Makefile
diff options
context:
space:
mode:
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}'