Skip to content

Commit

Permalink
fix: add event priority to keep order intact
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkrzyskow committed Nov 9, 2024
1 parent 57dbb92 commit d0cb088
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mkdocs_nype/extensions/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from mkdocs.config.base import Config
from mkdocs.config.config_options import Choice, Deprecated, DictOfItems, Optional, Type
from mkdocs.exceptions import PluginError
from mkdocs.plugins import event_priority


def extend_blog():
Expand Down Expand Up @@ -63,6 +64,7 @@ def extended(self, config):

def wrap_blog_on_files(func):

@event_priority(-50)
def extended(self, files, *, config):

result = func(self, files, config=config)
Expand All @@ -85,6 +87,7 @@ def extended(self, files, *, config):

def wrap_blog_on_page_markdown(func):

@event_priority(-50)
def extended(self, markdown: str, /, *, page, config, files):

view = self._resolve_original(page)
Expand Down Expand Up @@ -123,6 +126,7 @@ def extended(self, markdown: str, /, *, page, config, files):

def wrap_blog_on_page_context(func):

@event_priority(-100)
def extended(self, context, *, page, config, nav):

view = self._resolve_original(page)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "hatchling.build"

[project]
name = "mkdocs-nype"
version = "0.22.0"
version = "0.22.1"
description = "MkDocs theme for Nype MkDocs projects, extends the Material for MkDocs theme"
authors = [
{ name = "Kamil Krzyśków", email = "[email protected]" }
Expand Down

0 comments on commit d0cb088

Please sign in to comment.