# HG changeset patch # User Oleksandr Gavenko # Date 1456131312 -7200 # Node ID 12a7d89c74a929c3de6978508b02de309860cd17 # Parent 505319f3423ec9565b76deb3232a28a51f4bba93 Add template to generate HTML 5 compliant code. diff -r 505319f3423e -r 12a7d89c74a9 Makefile --- a/Makefile Sun Feb 21 00:20:10 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) { \ diff -r 505319f3423e -r 12a7d89c74a9 rst.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rst.tmpl Mon Feb 22 10:55:12 2016 +0200 @@ -0,0 +1,11 @@ + + + + +%(head)s +%(stylesheet)s +%(body_prefix)s +%(body_pre_docinfo)s +%(docinfo)s +%(body)s +%(body_suffix)s