-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
documentationDocumentation is requiredDocumentation is requiredenhancementNew feature or requestNew feature or requestfixedA fix has been submittedA fix has been submitted
Description
As explained by @timvink in squidfunk/mkdocs-material#5933, writers of other plugins would need some hook to declare variables, macros and filters before the Mkdocs-Macros is actually run.
The rule adopted is following: three methods register_variables()
, register_macros()
and register_filters()
.
To facilitate work, these three method should work regardless of the order of declaration of plugins.
- The other plugin is declared before Mkdocs-Macros (its
on_config()
is run beforeMacrosPlugin.on_config()
): they will be stored for later, and added last to the list of variables, macros or filters. - The other plugin is declared after: they are immediately added to the list of variables, macros or filters.
In both cases, those keys are added on top of all other ones. Duplicate keys are not allowed and will cause a KeyError.
Metadata
Metadata
Assignees
Labels
documentationDocumentation is requiredDocumentation is requiredenhancementNew feature or requestNew feature or requestfixedA fix has been submittedA fix has been submitted