From 9934dd538b0ce116e3b1600272cb46369b082246 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 2 Feb 2022 13:34:47 +0800 Subject: init commit --- www/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 www/Makefile (limited to 'www/Makefile') diff --git a/www/Makefile b/www/Makefile new file mode 100644 index 0000000..80b9d47 --- /dev/null +++ b/www/Makefile @@ -0,0 +1,14 @@ +.ONESHELL: +ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) + +# build html files for public/ +build: + @input_dir=~/log/posts \ + output_dir=/srv/http \ + assets_dir=$(ROOT_DIR)assets \ + template_dir=$(ROOT_DIR)templates \ + $(ROOT_DIR)scripts/build.sh + +# Migrage frontmatter from '---' to HTML comment '' +frontmatter: + find content -type f -name '*.md' | xargs sed -i ':frontmatter { 1s/^---//; 1!b}; /^---/ {1b frontmatter}' -- cgit v1.2.3-70-g09d2