From b9f28e54c1dd613d3aebfb3d4598d08b5d3a2ed4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 24 Feb 2021 21:45:01 +0100 Subject: [html] add pandoc template using a sidebar for the toc --- html/Makefile | 9 +- html/template.html | 285 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 289 insertions(+), 5 deletions(-) create mode 100644 html/template.html diff --git a/html/Makefile b/html/Makefile index d495a5a2..b11d692d 100644 --- a/html/Makefile +++ b/html/Makefile @@ -1,6 +1,6 @@ VERBOSE = @ -PANDOC_FLAGS = -f markdown -s +PANDOC_FLAGS = -f markdown -s --template=./template.html BUILDDIR = build @@ -11,8 +11,7 @@ EN_RULES = $(addprefix $(RULES_DIR)/en/,$(RULE_FILES)) RULES = $(DE_RULES) $(EN_RULES) RULES_HTML = $(addprefix $(BUILDDIR)/,$(RULES:.md=.html)) -MAPS_DIR = ../../maps -MAPS_BUILDDIR = $(BUILDDIR)/maps +MAPS_DIR = ../maps SITES = index.md rules.md cards.md maps.md HTML = $(addprefix $(BUILDDIR)/,$(SITES:.md=.html)) @@ -24,8 +23,8 @@ clean: rm -rf $(BUILDDIR) maps: - ln -sf $(MAPS_DIR) $(MAPS_BUILDDIR) - make -C $(MAPS_BUILDDIR) + ln -sf ../$(MAPS_DIR) $(BUILDDIR)/maps + make -C $(MAPS_DIR) $(BUILDDIR)/%.html: %.md @echo "building $@" diff --git a/html/template.html b/html/template.html new file mode 100644 index 00000000..9d27c27c --- /dev/null +++ b/html/template.html @@ -0,0 +1,285 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + + +$for(css)$ + +$endfor$ + +$if(math)$ + $math$ +$endif$ + +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
+

$title$

+$if(subtitle)$ +

$subtitle$

+$endif$ +$for(author)$ +

$author$

+$endfor$ +$if(date)$ +

$date$

+$endif$ +
+$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + -- cgit v1.2.3