-
Would like to use this plugin to create a wiki-inspired setup to create info-boxes with data in it... For that I would prefer to use jinja2 templating rather than having to touch python and setup entire code stuff... I saw that I could import macros using the
but only
The reason for this is easier maintainability as I wouldn't need to update X files if I decide to change the file location or name... I can do some python code, but I would prefer if the formatting/handling or variables would remain in a jinja2 template style... |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 17 replies
-
Would by any chance a snippet work here using pymdownx.snippet to include the |
Beta Was this translation helpful? Give feedback.
-
Thanks for you input. This is something I have been thinking about... hypothetically. 🤔 I covered this in #187 (comment) :
There could be also a |
Beta Was this translation helpful? Give feedback.
-
Absolutely. For your needs, check the documentation on post-production, for headers and footers. That would go into your Instead of inserting a string, you could of course read a file. |
Beta Was this translation helpful? Give feedback.
-
Issue #191 was fixed. |
Beta Was this translation helpful? Give feedback.
-
Another small thing I want to ask... Are there certain vars available through macros I define through a separate file that would allow access to page values? I want to use the |
Beta Was this translation helpful? Give feedback.
-
Not really related, but I want to ask here anyways: Is there a way to have the markdown parsed inside macros before it is applied? I use the file aproach here, meaning the macros is a jinja2 macros I have as an md file and I would like that text that is part of an arg would be parsed before applied, so that I can have stuff like I assume this may not work because macros are done after the on_markdown call thing? |
Beta Was this translation helpful? Give feedback.
-
Question related to the include statement... In what position is it called? Like when I use Because I would like to use icons bundled in Material for MkDocs, but so far I get |
Beta Was this translation helpful? Give feedback.
Absolutely. For your needs, check the documentation on post-production, for headers and footers. That would go into your
module.py
file.Instead of inserting a string, you could of course read a file.