Template overrides¶
Zensical uses MiniJinja for rendering templates, a template engine written in Rust that is largely compatible with Jinja, the template engine used by MkDocs. The switch to MiniJinja enables us to render templates in parallel, providing Zensical with a significant performance boost.
There are some differences between MiniJinja and Jinja, however. The most important one is that there is no Python interpreter available in MiniJinja. This means that it is not possible to call arbitrary Python functions. Instead, templates need to use the available filters, and tests.
Update overrides¶
We have made changes to the Material for MkDocs templates to ensure they are 100% compatible with MiniJinja. If you have adapted the standard templates to suit your own needs, you may need to migrate your changes over to the latest version of the templates.
The last change to adapt to MiniJinja was made in version 9.6.18 of Material for MkDocs. If you made your adaptation based on this or a later version, then you should be all set.
Remove function calls¶
If you are calling Python functions within your MiniJinja templates and are unable to replace them with the filters and tests available in MiniJinja, then you may need to wait until you can implement the required functionality as a module or a component. Both the module system and component system are features on our roadmap that we consider a high priority.