Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sphinx templating

I am using Sphinx. I want to template it. So after reading the docs, what I am trying is, in my conf.py,

I put a line like,

templates_path = ['_templates']

and I created a file

_templates/page.html

But this does not override the default template provided by sphinx. What more should I do, and where does this template need to go?


EDIT:

Directory structure from the comments:

conf.py
abc.txt
def.txt
makefile
_templates\
   page.html
like image 245
agiliq Avatar asked Jul 03 '09 13:07

agiliq


People also ask

What is Sphinx theme?

Sphinx theme is skin that changes the appearance of HTML version of the documentation. It contains HTML templates, CSS stylesheets, and static files like images, favicon, fonts, etc.

Does Sphinx support markdown?

To support Markdown-based documentation, Sphinx can use MyST-Parser. MyST-Parser is a Docutils bridge to markdown-it-py, a Python package for parsing the CommonMark Markdown flavor.


1 Answers

Be sure you are using the theme name as an explicit directory in your template. e.g.:

{% extends "basic/layout.html" %}

see: HTML Theming Support

like image 128
Kevin Horn Avatar answered Oct 29 '22 12:10

Kevin Horn