Skip to content

Commit

Permalink
Fix the CI by becoming compatible with new MkDocs 1.6.0 plugin interf…
Browse files Browse the repository at this point in the history
…aces
  • Loading branch information
EddyLuten committed Apr 22, 2024
1 parent 3d089b0 commit 5b84448
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions categories/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def clean_temp_dir(self):
return
shutil.rmtree(self.cat_path)

def on_nav(self, nav, **_):
def on_nav(self, nav, /, **_):
"""
Executed when the navigation is created. If the config option no_nav
is set to true, the categories section will be removed from the global
Expand All @@ -96,7 +96,7 @@ def on_post_build(self, **_):
self.pages.clear()
self.clean_temp_dir()

def on_page_markdown(self, markdown: str, *, page: Page, **_):
def on_page_markdown(self, markdown: str, /, *, page: Page, **_):
"""Appends the category links section for a page to the markdown."""
relative_url = get_relative_url(str(self.cat_path), page.file.src_uri)
if page.file.src_uri not in self.pages:
Expand Down Expand Up @@ -231,7 +231,7 @@ def render_parent_category(self, category: dict) -> str:
parent = self.categories[category['parent']]
return f"[{parent['name']}](./{parent['slug']}.md)"

def on_files(self, files, *, config, **_):
def on_files(self, files, /, *, config, **_):
"""When MkDocs loads its files, load any defined categories."""
self.define_categories(files)
for category in self.categories.values():
Expand Down

0 comments on commit 5b84448

Please sign in to comment.