Closed banson-aiq closed 7 months ago
I don't think :page_template:
is valid sphinx file-wide metadata? I've never seen it, and searching for page_template
in sphinx docs and source code doesn't turn up anything. I can get expected results if I change the filename from layout-main.html
to just layout.html
(still in the _templates
folder)... but that's going to affect all pages. The way I've handled page-specific templates in my own projects is to use jinja conditionals:
closing as "not planned" but feel free to re-open / ask clarifying questions if this doesn't solve your problem!
Thanks for looking into it. I ended up using jinja conditionals
I suspect this is likely me missing something, so hopefully someone can help me find the problem. After looking through the sphinx documentation I believe I should be able to extend the layout.html in pydata-sphinx-theme for a specific page using some jinja2 expressions. However no matter what I try I can't get the index.rst page to use the extended layout. Here is what I have setup...
doc/source/conf.py
snippetdoc/source/index.rst
the page I want to use the extended layoutdoc/source/_templates/layout-main.html
the extended layout template