dots/.wiki/Makefile

35 lines
913 B
Makefile
Raw Normal View History

2023-04-15 16:28:20 +02:00
NOTES := $(wildcard *.md)
AUXFILES := ./img/
target=wiki
2023-04-15 16:28:20 +02:00
exports=$(NOTES:.md=.html)
2023-04-15 16:28:20 +02:00
WIKI_DIR=/home/h/.wiki
2023-04-15 16:28:20 +02:00
%.html : %.md
2021-08-23 17:08:52 +02:00
pandoc \
2023-04-15 16:28:20 +02:00
-f markdown+latex_macros-yaml_metadata_block+abbreviations+emoji+pipe_tables \
-t html5 \
-c pandoc.css \
--citeproc \
--metadata-file=meta.yaml \
--template=$(WIKI_DIR)/template \
--bibliography $(WIKI_DIR)/references.bib \
--resource-path=$(WIKI_DIR)/img/ \
--lua-filter=$(WIKI_DIR)/filters/html-links.lua \
--lua-filter=$(WIKI_DIR)/filters/tikz.lua \
--lua-filter=$(WIKI_DIR)/filters/zotero.lua \
--lua-filter=$(WIKI_DIR)/lua-filters/diagram-generator/diagram-generator.lua \
--lua-filter=$(WIKI_DIR)/lua-filters/lilypond/lilypond.lua \
--toc \
--markdown-headings=atx \
--extract-media=img \
--strip-comments \
--file-scope \
-s -o "$@" "$<"
2023-04-15 16:28:20 +02:00
.PHONY: all clean
2023-04-15 16:28:20 +02:00
all: $(exports)
clean: rm $(exports)