-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Follow-up to #12/#15 — adding global TOC.
By setting file-wide metadata, before any other markup:
:page_template: sphinx_view/no-globaltoc.html
… it's possibly to switch the template used to render each page, for example to not show the global TOC, on the index page, where it's already defined.
assert doc["meta"]["page_template"] == "sphinx_view/no-globaltoc.html"
- Store the result of
get_doc_json()onself. (As a@property? 🤔) - Re-use that in
get_template_names()to see ifdoc["meta"]["page_template"]is set.
- Use that if so.
- Otherwise, self.template_name, as usual.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request