Skip to content

Resolve Variables from mkdocstrings #235

Answered by fralau
kferrone asked this question in Q&A
Discussion options

You must be logged in to vote

@pawamoy Just to summarize: you are using an Mkdocs-Macros module to monkey patch update_env() from the python handler in mkdocstrings, so that it renders (later, at the approriate time) the macros contained in the strings of Python code.

This approach is simple and clean and indeed, I would encourage developers to use and abuse the MacrosPlugin.render() method (note: if you want to be sure it will always render regardless of what Mkdocs-Macros would normally do, you might want to set force_rendering to True).

I am not sure I fully grasped the meanders of the calls to to the mkdocstrings plugin, but that is the gist, isn't it?

Replies: 8 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@fralau
Comment options

Answer selected by fralau
@pawamoy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pawamoy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #233 on July 20, 2024 14:43.