Skip to content

Commit

Permalink
Use .get_theme_dirs() instead of .themedir
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Feb 24, 2025
1 parent aeff3a7 commit 1fb70b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ntd2d/ntd2d_action/sphinxdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ def inherited_layout(self):
`{% extends "!layout.html" %}` should work, but doesn't.
https://github.com/sphinx-doc/sphinx/issues/12049
"""
def get_theme_layout(theme):
if (pathlib.Path(theme.themedir) / "layout.html").exists():
return f"{theme.name}/layout.html"
else:
return get_theme_layout(theme.base)
theme = self.get_theme(self.inherited_theme)
for dir in theme.get_theme_dirs():
layout = pathlib.Path(dir) / "layout.html"
if layout.exists():
return layout.

return get_theme_layout(self.get_theme(self.inherited_theme))
return layout.as_posix()

def assimilate_theme(self, name, insert_header_footer=True):
"""Replace configuration directory with customized html theme."""
Expand Down

0 comments on commit 1fb70b0

Please sign in to comment.