All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Fixed: `define_env() was always required in module (#191)
- Added: trace the case when no module is found (INFO)
- Improved documentation, particularly about HTML pages
- Added: parameters
j2_comment_start_string
andj2_comment_end_string
to plugin's parameters, to specify alternate markers for comments. - Added the multiline parameter
force_render_paths
in the config file, to specify directories or file patterns to be rendered for the case whenrender_by_default = false
(therender_macros
parameter in the YAML header of the page has the last word).
- Added: git.short_tag (#183)
- Added: Mermaid diagrams in the documentation (Readthedocs)
- Fixed: Changelog was no longer displayed (#186)
- Fixed: Warning due to filter issue with mkdocs >= 1.5
- Fixed: Debug html tables (including for
macro_info()
) are now readable also in dark mode.
- Added: it is now possible to use macros in page titles, in the nav section of the yaml file, or in the level 1 titles; the macros are correctly interpreted in the navigation part of the page.
-
Improved user guide, with introduction of two new pages: "Controlling macro rendering" and "Post production".
-
Fixed: (#158) In modules,
on_pre_page_macros()
, theenv.markdown
attribute is now available to create a header or footer. -
Changed: In
on_post_page_macros()
useenv.markdown
instead ofenv.raw_markdown
, for the same purpose. -
Added: (#162) Allow opt-in of page rendering, by using parameter
render_macros: true
in yaml header of the page (requiresrender_by_default:false
in the macro parameters, in the config file). -
Fixed:
macro_info()
now generates a header of category 2, so as to be used with other material in the same page, and not confuse the macro generators. -
Changed:
ignore_macros: true
in page header is deprecated. Userender_macros: false
instead. -
Fixed: issues #155 (documentation type), #143 (
git.tab
), #135 (indicate page where rendering failed). -
Bump version to 1.1.0 to acknowledge that API is stable.
-
Added: (#133)
on_error_fail
in config file to make build/serve process fail in case of macro error, with return code 100. -
Added: (#130) Documentation on the tree structure of a typical macro directory (package)
- Fixed: (#118)
{{ git.date }}
is now committer date (no longer author date). - Added: new git info elements (author email, committer, committer email); documentation was updated
- Added: by default, unknown variables in a markdown page (
{{ foo }}
) are no longer replaced by blanks but displayed as is (DebugUndefined) (#117); for better compatibility with other plugins or error detection - Added:
on_undefined
parameter in plugin definition to alter behavior with unknown jinja2 variables: 'keep' (default), 'silent', 'strict', 'lax'; documentation was updated
- Fixed: Broken build of 0.6.2
- Added:
env.markdown
is now modifiable, for use inon_post_page_macros()
- Added: auto-install of pluglets (in
module
parameter in config file)
- Fixed: documentation (for readthedocs) now contains proper link to edit uri on github
- Fixed: broken link in webdoc/docs/pages.md
- Bump version to 0.6.0, to acknowledge the breaking change in 0.5.10
- Fixed: Incompatibility with mkdocs 1.2
(
on_serve()
event, call toserver.watch()
)
- Added: Info on pluglets, on GitHub index page.
- Added: Contributing and Help pages, in documentation
Warning: Breaking Change
- Fixed: impossibility to use imported Jinja2 macros, without
with context
clause (#81). Now macros are imported as global. - Removed: Do not define macros as variables any longer, but as macros.
- incorrect:
env.variables['foo'] = foo
(though it should still work) - correct: prefix declaration with
@env.macros
orenv.macros['foo'] = foo
- incorrect:
- Added: Changelog is also part of documentation
- Added: Documentation moved under Material them, slate variant (dark)
- Added: Amended documentation (test install, discussions)
- Added: Changelog (Fixed #82)
- Fixed: display better message in case of macro syntax error (line_no, message, incriminated line in file). Traceback was useless with that specific exception, and has been removed.
- Added: Possibility (for large projects) to exclude a markdown page
from macro rendering, with
ignore_macros: true
in YAML header (fixed issue #78, and answered discussion #79)
- Added: Files object to the mkdocs-macros environment (fixed #80)
- Fixed: Documentation errors or omissions
- Fixed: Do not install pluglet mkdocs-macros-test by default (#50)
In order to do testing,
type:
pip install 'mkdocs-macros-plugin[test]'
- Starting point