Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Sep 22, 2023
1 parent d71348a commit d086b11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion mknodes/manual/navs_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def create_mkdoc_section(nav: mk.MkNav):

page = nav.add_index_page(hide="toc", icon="api")
page += mk.MkAdmonition(DOC_TEXT, typ="tip")
page.env.add_template("docs/classpage_custom.jinja")
mknodes_docs = nav.add_doc(
module=mk,
filter_by___all__=True,
Expand Down
6 changes: 6 additions & 0 deletions mknodes/navs/mkdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ def __init__(
self._exclude = exclude_modules or []
# self.root_path = pathlib.Path(f"./{self.module_name}")
super().__init__(section=section_name or self.module_name, **kwargs)
# we add the templates to the env after init to get correct environment.
# perhaps better to move this to a later stage..
if isinstance(class_page, str):
self.env.add_template(class_page)
if isinstance(module_page, str):
self.env.add_template(module_page)

def __repr__(self):
return reprhelpers.get_repr(
Expand Down

0 comments on commit d086b11

Please sign in to comment.