diff --git a/.gitignore b/.gitignore index f30ec77..c3c1d78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/*.pdf dist/*.html +dist/*.epub diff --git a/Makefile b/Makefile index b4c1630..219cc0a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ 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) +all: $(DEST_PDF_FILES) $(DEST_HTML_FILES) $(DEST_EPUB_FILES) dist/issue-%.pdf: issues/% $(PANDOC) \ @@ -34,8 +35,20 @@ dist/issue-%.html: issues/% --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 + @rm dist/*.html dist/*.pdf dist/*.epub .PHONY: clean diff --git a/dist/index.php b/dist/index.php index 36acb8e..717c0a4 100644 --- a/dist/index.php +++ b/dist/index.php @@ -25,6 +25,7 @@