summaryrefslogtreecommitdiffhomepage
path: root/www/Makefile
blob: cf45b29bf7d961129f206e76ae9c3a7c399fc9a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.ONESHELL:
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

# build html files for public/
build:
	cd $(ROOT_DIR)
	export INPUT_DIR=~/log/public
	export OUTPUT_DIR=/srv/http
	export HOST=topo.tw
	@scripts/build.sh

# Migrage frontmatter from '---' to HTML comment '<!-- -->'
frontmatter:
	find content -type f -name '*.md' | xargs sed -i ':frontmatter { 1s/^---/<!--/; 1!s/^---/-->/; 1!b}; /^---/ {1b frontmatter}'

rss:
	cd /srv/rss
	export LIST=~/log/public/links/rss.list
	$(ROOT_DIR)scripts/update-feeds.sh