From 72685228a7aacd6daa44da3833ac2eaeb80d1e39 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:03:03 -0500 Subject: move some stuff around --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7c7af1f --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +BUILD_DIR ?= build + +MARKDOWNFILES = $(wildcard md/*.md) +HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html) + +$(BUILD_DIR)/stories $(BUILD_DIR): + mkdir -p $@ + +$(BUILD_DIR)/stories/%.html: md/%.md | $(BUILD_DIR)/stories + pandoc "$<" \ + --standalone \ + --embed-resources \ + --template template.html \ + -o "$@" + +$(BUILD_DIR)/index.html: gen/gen_index.sh | $(BUILD_DIR) + bash $< | pandoc \ + --standalone \ + --embed-resources \ + --template template.html \ + -o "$@" + +all: make_dirs $(HTMLTARGETS) $(BUILD_DIR)/index.html + +.PHONY: make_dirs all + -- cgit v1.3.1