mkdocs-jupyter
mkdocs-jupyter copied to clipboard
Cross-reference in Notebooks markdown cell not rendered correctly
When I reference something from my API documentation, I'd expect this to work even inside jupyter notebooks as it does inside normal mkdocs pages with the mkdocstrings plugin.
For example, I want to be able to write this in a markdown cell in jupyter notebook:
[`MetaLearner.fit`][metalearners.metalearner.MetaLearner.fit]
and it should be rendered as a link pointing to the API method as it also happens in normal pages:
Current behavior just renders the text:
Have you encountered something like this before? At some point, the resolving of the references needs to be injected into the process before being rendered to plain html.
Happy to work on a solution.
Yeah, thats a known limitation. The issue is we render the notebook using nbconvert and it doesnt know its part of mkdocs. I imagine there is a way to maybe pass the MD to mkdocs so it handles those references. Thats probably easier than hacking into nbconvert to handle that.
Are you open to contributions to address this?
I have a branch here that implements this by leaving the content of Markdown cells as top-level content in the parsed notebook HTML, which allows MkDocs to process it instead.