3 SITEURL := https://blog.danieliu.xyz
5 .PHONY: help build clean
8 TEMPLATE_DIR := templates
13 ARTICLE_PATH := $(BUILD_DIR)/article
15 ARTICLE_LIST := $(basename $(shell ls $(SRC_DIR)))
18 echo 'pinopress help|build|clean'
20 build: $(BUILD_DIR)/rolling.html $(BUILD_DIR)/archive.html $(ARTICLE_PATH)/$(addsuffix .html,$(ARTICLE_LIST))
23 $(BUILD_DIR)/rolling.html:
24 echo 'building rolling file'
25 cat $(TEMPLATE_DIR)/head.template.html $(TEMPLATE_DIR)/rollingbody.template.html $(TEMPLATE_DIR)/foot.template.html > "$@"
27 $(BUILD_DIR)/archive.html:
28 echo 'building archive file'
29 cat $(TEMPLATE_DIR)/head.template.html $(TEMPLATE_DIR)/archivebody.template.html $(TEMPLATE_DIR)/foot.template.html > "$@"
31 $(ARTICLE_PATH)/%.html: articles/%.md
33 cat $(TEMPLATE_DIR)/head.template.html > "$@"
34 # module pipeline starts here
35 ./$(MODULE_DIR)/md "$^" >> "$@"
36 # module pipeline ends here
37 cat $(TEMPLATE_DIR)/foot.template.html >> "$@"
41 rm $(BUILD_DIR)/rolling.html $(BUILD_DIR)/archive.html $(ARTICLE_PATH)/*