executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
703 stars 188 forks source link

Please Add Support for `sphinx` extensions #633

Open adam-grant-hendry opened 1 year ago

adam-grant-hendry commented 1 year ago

Context

Several sphinx extensions are used in older restructured text projects, like;

and several others. Lacking support for these prevents other project from transitioning towards using myst-parser.

e.g. I will not switch over whilst these extensions are unavailable. I am able to achieve more by using restructured text, and these are still able to be used with the sphinx-themes.org themes.

Proposal

The proposal is to add extended support for sphinx extensions to the Sphinx parser in myst-parser.

Tasks and updates

TBD

chrisjsewell commented 1 year ago

Hey @adam-grant-hendry I'm not sure what you mean here; you can use any extension alongside myst-parser, as indeed is the case for the building of the documentation here: https://github.com/executablebooks/MyST-Parser/blob/28725fceb8e1e117cb247b06a267f82c501ce527/docs/conf.py#L28

Is there a particular issue you have with compatibility on a certain extension?

adam-grant-hendry commented 1 year ago

Hi @chrisjsewell,

Ah, perhaps I misunderstood: the numpydocs documentation details using rst-style directives, so I wasn't sure if there would be a conflict with using rst-style directives in docstrings if I wanted to use myst-parser syntax in my documentation files...?

One thing for certain that would be excellent is support for adding/specifying 3rd-party MarkdownIt plugins via the conf.py (Issue #632).