Custom theme problems in Sphinx 1.3.1?

303 views
Skip to first unread message

Jack Elder

unread,
Apr 15, 2015, 8:54:51 PM4/15/15
to sphinx...@googlegroups.com
Hi all;

Have a number of projects building with Sphinx.  Previously I was using Sphinx 1.3b1, and things were mostly fine.  I've just upgraded to 1.3.1, and the compilation has started to break.  Has anyone else seen this? 

Specifically, the problem is related to me using a custom theme name in the conf.py.  If I set the conf.py to:

html_theme = 'sphinx_rtd_theme'


... the project compiles fine.

However, if I set the conf.py to:

html_theme = 'my_custom_theme'

Then the build throws this warning:

WARNING: 'default' html theme has been renamed to 'classic'. Please change your html_theme setting either to the new 'alabaster' default theme, or to 'classic' to keep using the old default.

... and then dies with a TemplateNotFound(template) exception, throwing an  error about not being able to find the default/layout.html template.  Also worth noting that it definitely knows the theme's there - if I set the custom theme to an invalid value, it throws a perfectly normal 'Template not found' error, as you'd expect. 

Builds fine with 1.3b1 with the custom theme;  fails with 1.3.1. 

Has anyone seen this?  I'm presuming I'm not the only one using a custom theme with 1.3.1, so it seems like this would have come to light earlier.  I had a look at the open issues on GitHub but couldn't find anything obvious related.

Cheers

jack

Jan Ulrich Hasecke

unread,
Apr 16, 2015, 7:34:03 AM4/16/15
to sphinx...@googlegroups.com
Hi Jack,

I am not an expert with theming Sphinx, but your theme might inherit
from default theme, which now is named classic.

Look into your theme.conf file.

[theme]
inherit = base theme
stylesheet = main CSS name
pygments_style = stylename

set base theme to classic and try again.

http://sphinx-doc.org/theming.html#creating-themes

juh

--
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten

Jack Elder

unread,
Apr 16, 2015, 8:20:06 PM4/16/15
to sphinx...@googlegroups.com, juh+sphi...@mailbox.org
Ha, yup, that's the problem.  Many thanks!

J
Reply all
Reply to author
Forward
0 new messages