From 560ec1dc9237ea93b263c9d09bf343ab420a3f6a Mon Sep 17 00:00:00 2001 From: Cory Burgett Date: Thu, 21 Jan 2016 23:41:39 -0500 Subject: [PATCH] Add template for HTML docs. --- TMakefile | 8 ++++--- doc/template.html | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 doc/template.html diff --git a/TMakefile b/TMakefile index 09548c6..c3ea79f 100644 --- a/TMakefile +++ b/TMakefile @@ -147,14 +147,16 @@ rule tmk {jim sqlite3.o $C_SRC $H_SRC} { # ---------------------------------------------------------------------------- set DOCS {jimtcl/Tcl_shipped.html doc/refman.md} -rule doc-html $DOCS { +rule doc-html {$DOCS template.html} { file copy -force jimtcl/Tcl_shipped.html doc/Jim_Tcl.html - exec pandoc -f markdown_github -t html -o doc/refman.html doc/refman.md + exec pandoc -S -s --toc --template=./doc/template.html \ + -f markdown_github -t html -o doc/refman.html doc/refman.md } rule doc-pdf $DOCS { exec pandoc -f html -t latex -o doc/Jim_Tcl.pdf jimtcl/Tcl_shipped.html - exec pandoc -f markdown_github -t latex -o doc/refman.pdf doc/refman.md + exec pandoc -S -s --toc \ + -f markdown_github -t latex -o doc/refman.pdf doc/refman.md } rule doc-all {doc-html doc-pdf} diff --git a/doc/template.html b/doc/template.html new file mode 100644 index 0000000..c485ffe --- /dev/null +++ b/doc/template.html @@ -0,0 +1,69 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(quotes)$ + +$endif$ + +$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)$ +

Table of Contents

+
+$toc$ +
+$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + -- 2.11.4.GIT