-
Notifications
You must be signed in to change notification settings - Fork 197
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
Question: {include} rST files in md? #204
Comments
Heya, yeh I was gonna say the solution here would likely be #164, but I'll bear this particular use case in mind. Obviously, I would prefer if we could try to find "Markdown solutions". For example, admonitions (like note boxes) are not rendered very nicely at present in standard markdown renderers; well just today I've nearly finished a feature to improve that situation 😄 (#203) see: https://myst-parser--203.org.readthedocs.build/en/203/using/syntax.html#admonition-directives-special-syntax-optional and there also a few more GFM ~compatible syntax features I am looking into adding https://github.com/executablebooks/markdown-it-py/issues/23 |
Closed in v0.12.2 😄 see: https://myst-parser.readthedocs.io/en/latest/using/howto.html#include-rst-files-into-a-markdown-file |
Updated link: https://myst-parser.readthedocs.io/en/latest/sphinx/use.html?highlight=include#include-rst-files-into-a-markdown-file and spoiler:
|
Is your feature request related to a problem? Please describe.
It would be nice if it were possible to include the parsed output from an
.rst
formatted file in a MyST markdown file via the{include}
(or perhaps some other, new) directive.Describe the solution you'd like
For example, let's say you have two files:
hello.rst
andworld.md
like so:hello.rst:
.. note:: Hello
world.md:
The desired output after running sphinx would be an html file containing two note boxes. Given that this feature crosses the boundary between parsing MyST files and building with sphinx, I'm not sure that this is the appropriate place to raise the issue... please LMK if there is a better place for it!
Describe alternatives you've considered
The simplest solution would be to convert the file (e.g.
hello.rst
in the example above) to myst syntax. There are some cases where this isn't feasible. For example, consider acontributing
page in the documentation. One may want to have this included in, say, the sphinx documentation for a project as well as in the top level of the github repo. Since GitHub only supports parsing rst or gfm, you may have a situation where you want to{include} CONTRIBUTING.rst
in the docs.Of course, you can leave the file which includes the external file in
.rst
format, but then you have a mix ofrst
andmd
files in the documentation which may be confusing for new contributors.Additional context
This question/feature request arose from the discussion in scikit-image/scikit-image#4863
Also possibly related to #163/#164
The text was updated successfully, but these errors were encountered: