aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 10:15:57 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 10:15:57 -0500
commitad0bbbc109ae8aeb7559cdbecf3c66b900f7e885 (patch)
tree6cd0b37563338a6a9366cb0e2b80df6031627736 /src/Makefile
parent56ef5d80e70e8301e150317d57428c87514c01bd (diff)
initial commit
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..c60678a
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,28 @@
+BUILD_DIR = _build
+
+MARKDOWNFILES != find md/ -type f -name "*.md"
+HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html)
+
+$(BUILD_DIR)/stories/%.html: md/%.md
+ pandoc "$<" \
+ --standalone \
+ --embed-resources \
+ --template template.html \
+ -o "$@"
+
+$(BUILD_DIR)/index.html: make_index.md.sh
+ bash $< | pandoc \
+ --standalone \
+ --embed-resources \
+ --template template.html \
+ -o "$@"
+
+make_dirs:
+ mkdir -p $(BUILD_DIR)/stories
+
+all: make_dirs $(HTMLTARGETS) $(BUILD_DIR)/index.html
+
+clean:
+ rm -rf $(BUILD_DIR)
+
+.PHONY: clean make_dirs all up