Add template to generate HTML 5 compliant code.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 10:55:12 +0200
changeset 68 46721724e2a3
parent 67 78cb29831702
child 69 f82b136921b7
Add template to generate HTML 5 compliant code.
Makefile
--- a/Makefile	Sun Feb 21 00:17:25 2016 +0200
+++ b/Makefile	Mon Feb 22 10:55:12 2016 +0200
@@ -34,8 +34,8 @@
 endif
 
 RST_WARNING_FLAGS := --halt warning
-RST_FLAGS := --strip-comments
-RST_FLAGS += $(RST_WARNING_FLAGS)
+RST_RENDER_FLAGS := --strip-comments --embed-stylesheet --no-xml-declaration --math-output=MathJax
+RST_FLAGS := $(RST_WARNING_FLAGS) $(RST_RENDER_FLAGS)
 
 ################################################################
 # Proj dirs/files.
@@ -95,8 +95,8 @@
 .PHONY: html
 html: $(HTML_FILES) $(TXT__FILES)
 
-$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css $(MAKEFILE_LIST) | $(HTML_DIR)
-	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css $*.rst $@
+$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
+	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css --template=rst.tmpl $*.rst $@
 
 $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
 	{ \