From 3137020277022db46a74b2b1916ccf63672ef460 Mon Sep 17 00:00:00 2001 From: Daniel Taskoff Date: Sat, 25 Jun 2016 12:08:35 +0300 Subject: [PATCH] Add a template for creating an epub file Previously, the title, author and date weren't displayed and the table of contents had an empty field. --- Makefile | 4 +++- resources/page.epubt | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 resources/page.epubt diff --git a/Makefile b/Makefile index 9d5adf7..30170fc 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ IFORMAT = markdown FLAGS = --standalone --toc --toc-depth=2 --highlight-style pygments TEMPLATE = resources/page.tmpl LTEMPLATE = resources/page.latex +ETEMPLATE = resources/page.epubt STYLE = css/style.css GHC=ghc @@ -21,7 +22,8 @@ includes: includes.hs | sed '//r extensions.html' > $@ %.epub: %.md includes - ./includes < $< | $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@ + (cat $(ETEMPLATE); ./includes < $<) \ + | $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@ %.pdf: %.md includes ./includes < $< | $(PANDOC) -c -s -f $(IFORMAT) --template $(LTEMPLATE) --latex-engine=xelatex $(FLAGS) -o $@ diff --git a/resources/page.epubt b/resources/page.epubt new file mode 100644 index 0000000..0ab7b75 --- /dev/null +++ b/resources/page.epubt @@ -0,0 +1,4 @@ +% What I Wish I Knew When Learning Haskell (Version 2.3) +% Stephen Diehl +% March 2016 +