-
Notifications
You must be signed in to change notification settings - Fork 52
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
Convert Documentation from reST to Markdown #117
Conversation
Codecov Report
@@ Coverage Diff @@
## main #117 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 55 55
=========================================
Hits 55 55
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
The pre-commit bot tries to use mdformat to correct the Markdown format. Because he does not know any of the extensions of MyST, this leads to him for example escaping a bunch of directives that use colon fencing. |
Thanks! Modifying the behavior of mdformat seems like the way to go, see e.g. https://github.com/executablebooks/mdformat-myst/blob/master/.pre-commit-config.yaml |
It seems to me, that there is no way to modify mdformat to include MyST extensions, without writing the extensions for mdformat ourselves. See this Issue executablebooks/mdformat-myst/issues/5, where they talk about writing an extension to include colon fences, which sadly did not happen yet. I guess we should stop the bot from reformatting the docs, at least until mdformat is updated to include extensions? |
Cool, thanks for the investigation! Do we strictly need those colon fences or are they more a convenience making the automated conversion simpler? If the former, it might well be worth investigating whether we could help mdformat-myst, in case you'd enjoy that! |
We don't really need any extensions right now, they are mostly for convenience or to make MyST look more markdownish. I will just change some of the md-files and remove the extensions that are not supported from the conf.py to prevent confusion for future contributors. |
docs/source/conf.py
Outdated
@@ -50,7 +50,7 @@ | |||
] | |||
|
|||
# MyST | |||
myst_enable_extensions = ["colon_fence", "deflist", "dollarmath"] | |||
myst_enable_extensions = ["dollarmath"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
myst_enable_extensions = ["dollarmath"] | |
myst_enable_extensions = ["amsmath"] |
While browsing things earlier today, I noted that dollarmath might be gone from MyST in the future executablebooks/MyST-Parser#505. Makes sense because for parsers, you definitely want to differentiate between start/end sequences delimiting environments. So we'll want to be future-proof here :-)
Reference on AMSmath: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-amsmath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would probably have to remove it completely then and only use the math-directive for equations. Because dollarmath is the only extension that works with mdformat (for legacy reasons, might also be changed in the future).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's remove it then. Thanks!
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Guide for translation of other projectsThanks to @mj023! Translation of files that are rendered using sphinxThis should include all files in the docs folder.
Known Problems:
Translation of files that are rendered on GitHubThis should include, for example, the
Known Problems:
|
As described in #112 I started converting all .rst-files to .md-files. The docs will use MyST-Markdown, because it retains most of the reST functionality while being compatible with ReadTheDocs. The README will use github-flavored-markdown (gfm) as GitHub can't render some of the MyST Syntax.