Replies: 2 comments 7 replies
-
Hi @Jc-L, Sorry for my late answer. The specific jinja2 engine used by mkdocs_macros (on the markdown page) is not the same used by mkdocs (on HTML). The template engine used for mkdocs_macros is earlier on the page production chain. Depending on what template engine you want to use, the answers are different (but they might also differ, according to what step of the macro conversion step you are one). You would have to tell me more precisely about your use case, and what effect you want to achieve? |
Beta Was this translation helpful? Give feedback.
-
Hi @fralau and thank you for the answer. I am considering moving from a This is just an example, and I considered the |
Beta Was this translation helpful? Give feedback.
-
How to access to other pages' metadata to use in pure jinja2 ? Use-case is to provide summary pages listing other pages matching some specific metadata (for example recently edited pages, pages marked for review, etc.
I attempted to use:
However, in such metadata is only available for the current page, not for all pages.
Note: such info is available in vanilla mkdocs in the
pages
variable usable in templates. (see pages.py). Thepages
is a list ofFiles
object that contain aPages
that contains the metadata.Beta Was this translation helpful? Give feedback.
All reactions