I\'m implementing a documentation using Sphinx (https://github.com/fridge-project/dbal-docs) & would like to override the html page of a specific document. My interest i
One should be able to use a variable to define the template to extend from.
In that way it might be less of a 'hack'. And you have full control about the generated output(not only the body
block).
layout.html:
{% extends meta.page_template|default('basic/page.html') %}
And in your index.rst you use then page-level metadata:
index.rst:
:page_template: custom/index.html