Browse Source

add epub type

pull/5/head
Ben Harris 2 years ago
parent
commit
621f1028ca
  1. 1
      .gitignore
  2. 17
      Makefile
  3. 1
      dist/index.php

1
.gitignore

@ -1,2 +1,3 @@
dist/*.pdf
dist/*.html
dist/*.epub

17
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

1
dist/index.php

@ -25,6 +25,7 @@
<p>
<a href="issue-<?=$issue?>.html">html version</a>
<a href="issue-<?=$issue?>.pdf">pdf version</a>
<a href="issue-<?=$issue?>.epub">epub version</a>
</p>
<?php } ?>

Loading…
Cancel
Save