File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -161,13 +161,13 @@ def inherited_layout(self):
161161 `{% extends "!layout.html" %}` should work, but doesn't.
162162 https://github.com/sphinx-doc/sphinx/issues/12049
163163 """
164- def get_theme_layout ( theme ):
165- if ( pathlib . Path ( theme .themedir ) / "layout.html" ). exists ():
166- return f" { theme . name } / layout.html"
167- else :
168- return get_theme_layout ( theme . base )
164+ theme = self . get_theme ( self . inherited_theme )
165+ for dir in theme .get_theme_dirs ():
166+ layout = pathlib . Path ( dir ) / " layout.html"
167+ if layout . exists () :
168+ break
169169
170- return get_theme_layout ( self . get_theme ( self . inherited_theme ) )
170+ return layout . as_posix ( )
171171
172172 def assimilate_theme (self , name , insert_header_footer = True ):
173173 """Replace configuration directory with customized html theme."""
You can’t perform that action at this time.
0 commit comments