forked from tildeverse/zine
add epub type
This commit is contained in:
parent
0139cf078e
commit
621f1028ca
|
@ -1,2 +1,3 @@
|
|||
dist/*.pdf
|
||||
dist/*.html
|
||||
dist/*.epub
|
||||
|
|
17
Makefile
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
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue