Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom theme extended from alabaster or sphinx_rtd_theme can't find base theme. #1794

Closed
shimizukawa opened this issue Mar 22, 2015 · 2 comments

Comments

@shimizukawa
Copy link
Member

Sphinx 1.3 include theme paths for 'alabaster' and 'sphinx_rtd_theme' automatically if html_theme is specified them.
However, if user custom theme extends from them, the path isn't included automatically.

IMO, a custom theme has inherit = alabaster or inherit = sphinx_rtd_theme, the base theme path should be included automatically.

@shimizukawa
Copy link
Member Author

Now sphinx theme loader loads alabaster and sphinx_rtd_theme automatically if a theme is inherited from them.This ticket can be closed.

However, alabaster and sphinx_rtd_theme doesn't have theme name directory.
Consequence of it, layout.html of custom derived theme can't extend from them because {%- extends "alabaster/layout.html" %} is not valid and {%- extends "!layout.html" %} cause infinite loop (leadning exclamation mark excludes _templates, but doesn't exclude custom theme directory itself).

In conclusion, themes without a theme name directory in the theme path (like alabaster-0.7.3 and sphinx_rtd_theme-0.1.7) is not extendable.

shimizukawa added a commit that referenced this issue Apr 5, 2015
@shimizukawa
Copy link
Member Author

However, alabaster and sphinx_rtd_theme doesn't have theme name directory.
Consequence of it, layout.html of custom derived theme can't extend from them because {%- extends "alabaster/layout.html" %} is not valid and {%- extends "!layout.html" %} cause infinite loop (leadning exclamation mark excludes _templates, but doesn't exclude custom theme directory itself).

In conclusion, themes without a theme name directory in the theme path (like alabaster-0.7.3 and sphinx_rtd_theme-0.1.7) is not extendable.

I was wrong.
Now sphinx supports theme that inherit from non-builtin themes.

shimizukawa added a commit that referenced this issue Nov 21, 2015
Closes #1885: A part of code for this fix is from pull requeest #1885.
refs #1794
techtonik added a commit to techtonik/mingwpy.github.io that referenced this issue Dec 28, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant