mkdocs_nype.plugins.custom_blog_categorization.plugin
Synopsis
MkDocs plugin made to add a custom categorization to the material/blog plugin.
This plugin was formerly a hook:
By default the blog plugin only allows to use Archive and Category views. This plugin adds another for a Custom view.
A lot of the code is based from the plugin as those instructions aren't in importable functions.
Note
- This only generates the "back-end" Python data structures, the user has to add overrides for blog*.html templates. Use page.code_name or view.code_name to access the list of attached pages. (where code_name is the defined name in mkdocs.yml)
MIT License 2024 Kamil Krzyśków (HRY) for Nype (npe.cm)
LOG
Logger instance for this plugins.
CustomBlogCategorizationPlugin
Bases: BasePlugin[CustomBlogCategorizationConfig]
on_page_markdown
Add custom categorization to the excerpt
decorate_render_post
The categorization_toc isn't taken into account when rendering, so adjust the view afterwards
_get_exp_blog_instance
Find the blog with the Experience URL
_generate_categorization_views
Generate views for custom categorization. Based on BlogPlugin._generate_categories
_format_path_for_industry
Format path for industry Based on BlogPlugin._format_path_for_category