summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-10-31 19:40:35 +0200
committerLars Wirzenius <liw@liw.fi>2023-11-06 08:57:20 +0200
commitbfb56ad43fb63f46dc247e6d5382fdeb1e4772cd (patch)
treec5c382638c1c8989bd4e06eca64fc27a5b296a02 /Makefile
parentca00525a42de0fc909becc68a677cd6a167a856d (diff)
downloadgtdfh.liw.fi-bfb56ad43fb63f46dc247e6d5382fdeb1e4772cd.tar.gz
rewrite the whole site
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 13 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 88b3a51..389cca6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,16 @@
-chapters = $(shell ./list-chapters index.mdwn)
+SHELL = bash
+TARGET = _ewww@web:/srv/http
-all: book.pdf book.epub book.mobi
+all: gtdfh.html
-book.pdf: $(chapters)
- pandoc -V geometry:a4paper --top-level-division=chapter \
- --toc -o book.pdf $(chapters)
+gtdfh.html: index.mdwn gtdfh.css Makefile
+ pandoc -f markdown+implicit_figures --toc --self-contained -N \
+ --metadata title="GTDFH" --metadata subtitle="Getting Things Done for Hackers" \
+ -H <(echo "<style>"; cat gtdfh.css; echo "</style>") --standalone index.mdwn -o gtdfh.html
-book.epub: $(chapters) cover.png
- pandoc -t epub --epub-metadata=book.xml --epub-cover=cover.png \
- -o book.epub $(chapters)
-
-book.mobi: book.epub
- ebook-convert book.epub book.mobi
-
-cover.png: cover.svg
- inkscape -e cover.png cover.svg
-
-count:
- wc -w $(chapters)
- echo 100 '*' $$(cat $(chapters) | wc -w) / 30000 | bc -l
-
-clean:
- rm -f book.pdf book.html book.epub book.mobi cover.png
+publish: all
+ mkdir publish
+ cp -a gtdfh.html publish/index.html
+ cp gtdfh.css publish
+ rsync -a --del publish/. $(TARGET)/.
+ rm -r publish