-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown support #287
Comments
I wouldn't want to have to maintain two sets of templates (one in rst and one in markdown) so I think it makes sense to let users do that themselves if they want to. |
Yeah, I can understand that.
Do you have an idea on how best to make those converted-to-markdown templates available to other projects than mine? For an end user shipping them via pypi package would be simplest I guess, so it could be dependent upon. That could install them and export the location via
Great. I'll make a PR for that sometime then. |
Heya, cross-posting this update: executablebooks/MyST-Parser#228 (comment) |
Heya, I've now created https://sphinx-autodoc2.readthedocs.io/en/latest/quickstart.html#using-markdown-myst-docstrings 😅 Its based on the great work here but, I feel with some improvements: https://github.com/chrisjsewell/sphinx-autodoc2#design-and-comparison-to-sphinx-autoapi Happy to collaborate and even upstream/consolidate the two packages if you are interested! |
I've started implementing this. You can see what I have so far here: https://github.com/readthedocs/sphinx-autoapi/tree/markdown
So far I've taken the approach of using two sets of templates. But I'm thinking I may pivot and allow templates to be provided via plugins. Essentially what the original description suggested. So AutoAPI wouldn't provide the markdown templates necessary, but I would support everything required for a plugin to provide them (including the new @chrisjsewell I have another question. My implementation isn't quite working properly. Possibly due to nesting the directive by indentation. AutoAPI is outputting this: sphinx-autoapi/tests/python/pymarkdownexample/autoapi/example/index.md Lines 137 to 149 in 4568f5a
Sphinx renders that like this: Do you know why this wouldn't be working? |
Happy new year! Just though I'd check in on the status here, would be great to have native markdown support :) |
This will be the next big thing I work on after getting #399 over the finish line. |
@AWhetter, we would love to write our docstrings in Markdown - is there any updated on this feature? Many thanks! |
Tangent, can't an approach here be back-ported to
If |
I'm currently moving our tutorial notebooks/documentation from RST with
jupyter-sphinx
to Markdown withmyst-nb
. We'd eventually like to also move docstrings to be written in myst-markdown. To that end I'm now looking at what I actually need fromsphinx-autoapi
to make that possible. I came up with this:sphinx.util.docstrings.prepare_docstring
analog from myst. This is to allow two sets of default templates to exist.'*.rst'
instances in template loading/rendering (mappers/base.py
) use some config value instead. The actual file output suffix is already (not really explicitly) configurable.I'd be happy to contribute this. If I was to do this just for our project, I'd still have to do step 1., but keep the
.rst
filenames. And step 2. seems pretty trivial.What do you think?
The text was updated successfully, but these errors were encountered: