- https://readthedocs.org/projects/sqlalchemy/downloads/epub/latest/ renders with the full template which is unreadable on e-readers
- in the makefile the template-variable mako_layout is set for target: epub which makes mako use only the base layout.
- this is the more elegant solution as proposed to #133
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ $(SPHINXBUILD) -b epub -A mako_layout=epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
<%inherit file="${context['base']}"/>
+<%
+ if mako_layout == 'epub':
+ next.body()
+ return
+%>
+
+
<%
withsidebar = bool(toc) and current_page_name != 'index'
%>