Skip to content

Improved workflow

Compare
Choose a tag to compare
@fralau fralau released this 23 Nov 19:17
· 195 commits to master since this release

Now mkdocs-macros has has better integration with the general workflow

  1. Metavariables declared in the YAML header of a markdown page are now directly accessible by macros in the page, without needing to go through the page.meta object (e.g. if the meta-variable foois declared in the YAML header, it can be accessible as {{ foo }} as well as {{ page.meta.foo }}. It makes using macros much simpler.

  2. The console messages of mkdocs-macros are now integrated with the standard logging of MkDocs. It means that you can both suppress them (--quiet option) or expand them to include debug messages (--verbose).

  3. Macros have their own trace function (chatter()) which writes into MkDocs' log as Info. If you are using the local server (mkdocs serve), you can toggle that trace on and off, with a verbose parameter in the plugin's configuration and this will be instantly reflected on the console.

  4. The Python module can use a new on_post_build() function, for actions that need to take place after the HTML site directory is built (typically adding or modifying files).