Replies: 2 comments 2 replies
-
Thanks for your question! (I hope I am tracking?) Macros are designed to work in the markdown pages. Mkdocs-macros renders the macros during To include non markdown files, you may use the Jinja2 include directive. Include does render the file included (see the paragraph in mkdocs-macros). |
Beta Was this translation helpful? Give feedback.
-
You can used fenced blocks, if necessary:
See also my comment on mkdocs/mkdocs/discussions/3251 |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm currently working on documenting my Python package using Material for MkDocs, and I'm having a great experience with it so far.
One of the things I want to achieve is to use custom variables (macros) in my documentation to make it more maintainable. I have successfully used macros in my
.md
files, but I'm facing some challenges when trying to use them in my Python docstrings.To clarify, in my
.md
files, I'm following the standard approach using macros, and it works like a charm:However, when I attempted to load macros from my Python docstrings, it didn't work as expected and it would output
[my link]({{ homepage }}/about/)
Here's what I tried:
Thanks in advance for any assistance or suggestions you can offer!
Beta Was this translation helpful? Give feedback.
All reactions