55 lines
1.2 KiB
Makefile
55 lines
1.2 KiB
Makefile
ISSUES != find issues -type d
|
|
DEST_PDF_FILES := $(ISSUES:issues/%=dist/issue-%.pdf)
|
|
DEST_HTML_FILES := $(ISSUES:issues/%=dist/issue-%.html)
|
|
DEST_EPUB_FILES := $(ISSUES:issues/%=dist/issue-%.epub)
|
|
|
|
PANDOC != command -v pandoc 2> /dev/null
|
|
|
|
all: $(DEST_PDF_FILES) $(DEST_HTML_FILES) $(DEST_EPUB_FILES)
|
|
|
|
dist/issue-%.pdf: issues/%
|
|
$(PANDOC) \
|
|
--file-scope \
|
|
--from markdown \
|
|
--to latex \
|
|
--pdf-engine xelatex \
|
|
--table-of-contents \
|
|
--variable title:"tildeverse zine $@" \
|
|
--standalone \
|
|
--output $@ \
|
|
$</*.md
|
|
|
|
dist/issue-%.html: issues/%
|
|
$(PANDOC) \
|
|
--file-scope \
|
|
--from markdown \
|
|
--to html \
|
|
--standalone \
|
|
--table-of-contents \
|
|
--lua-filter header-permalinks.lua \
|
|
--lua-filter increase-header-levels.lua \
|
|
--metadata title:"tildeverse zine $@" \
|
|
--variable include-before:"<div class=\"container\">" \
|
|
--variable include-after:"</div>" \
|
|
--css https://tilde.team/css/hacker.css \
|
|
--output $@ \
|
|
$</*.md
|
|
|
|
dist/issue-%.epub: issues/%
|
|
$(PANDOC) \
|
|
--file-scope \
|
|
--from markdown \
|
|
--to epub \
|
|
--standalone \
|
|
--table-of-contents \
|
|
--lua-filter increase-header-levels.lua \
|
|
--metadata title:"tildeverse zine $@" \
|
|
--output $@ \
|
|
$</*.md
|
|
|
|
clean:
|
|
@rm dist/*.html dist/*.pdf dist/*.epub
|
|
|
|
.PHONY: clean
|
|
|