Skip to content

mkdocs_nype.plugins.canonical_merge.plugin

Synopsis

MkDocs plugin made to merge 2 build directories.

This plugin was formerly a hook:

It expects the default site directory as source for the other files. It also adjusts canonical URL values of pages.

Note

MIT License 2024 Kamil Krzyśków (HRY) for Nype (npe.cm) and Fiori Tracker (fioritracker.org)

OLD_PREFIX

OLD_PREFIX: str = 'V2020/'

SITEMAP_REDIRECT_MAP

SITEMAP_REDIRECT_MAP: dict[str, str] = {}

ENABLED

ENABLED = False

CanonicalMergePlugin

Bases: BasePlugin[CanonicalMergeConfig]

on_startup

on_startup(command, dirty)

on_config

on_config(config)

on_page_markdown

on_page_markdown(markdown, page: Page, config: MkDocsConfig, files)

The pages need to have proper rel=canonical values

on_post_build

on_post_build(config: MkDocsConfig)

Copy the files over making sure some files aren't overriden