Skip to content

Blog plugin to not mix on_files and on_nav objects #5909

@ultrabug

Description

@ultrabug

Context

I'm working on making sure the mkdocs-static-i18n plugin is compatible with the blog plugin

Description

The blog plugin adds file objects to the Files structure in the on_nav event handler which is not an expected behavior and breaks expectations from other plugins.

Files should be manipulated only on the on_files event hander.

The on_nav event handler of the blog plugins calls methods such as _generate_archive, _generate_categories and _generate_pages which are adding file-like objects to the files one.

Other plugins such as the mkdocs-static-i18n rely on the fact that the files structure does not change after the on_files event handler is done.

Related links

Use Cases

Bring i18n support to blogs generated thanks to mkdocs-material

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions