-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm][docs] Convert LLVM release notes to Markdown #109107
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
Conversation
✅ With the latest revision this PR passed the Python code formatter. |
ca76f00
to
fdfb179
Compare
0dcf6e6
to
91ec8b4
Compare
* Markdown is the most common format on GitHub and most contributors are more familiar with it than RST. * This leads to mistakes in the RST syntax and/or folks just using Markdown syntax and assuming it works. * The release notes have a high number of edits and a high number of views, we should optimise for making the common path easy. That is, adding a bullet point and a link. * Though GitHub can render RST and Markdown, its support for Markdown is more complete (and neither handle the Sphinx directives well). * We already have some Markdown docs in the llvm docs. To keep the original formatting we do need some Sphinx directives still, and those are provided by MyST which is already enabled. https://myst-parser.readthedocs.io/en/latest/ I did have to enable an extension so we can substitute in the release version. https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2 Needing to use MyST means there is some special knowledge needed if you want to do advanced things, but at least the basics remain Markdown. Even in RST form, you still had to look up Sphinx syntax. I also make use of a nested directive https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives to implement the prerelease warning. The note about sections referred to another note that got removed in 4c72deb. I presume accidentally, so I have restored that. I also removed the "Update on required toolchains to build LLVM" header because the section is now empty. The other difference is that the table of contents now has a heading "Contents". This is the default and I could not find a way to remove that name. Otherwise it's the same table as you'd get from the RST document.
91ec8b4
to
e164fda
Compare
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.
LGTM
If you are here wondering why you now have a merge conflict, to convert your release note to Markdown you probably just need to replace the link and plain text syntax: This can be previewed on GitHub to check you have done this correctly ("Display Rich Diff" in the code review section). |
* Markdown is the most common format on GitHub and most contributors are more familiar with it than RST. * This leads to mistakes in the RST syntax and/or folks just using Markdown syntax and assuming it works. * The release notes have a high number of edits and a high number of views, we should optimise for making the common path easy. That is, adding a bullet point and a link. * Though GitHub can render RST and Markdown, its support for Markdown is more complete (and neither handle the Sphinx directives well). * We already have some Markdown docs in the llvm docs. To keep the original formatting we do need some Sphinx directives still, and those are provided by MyST which is already enabled. https://myst-parser.readthedocs.io/en/latest/ I did have to enable an extension so we can substitute in the release version. https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2 Needing to use MyST means there is some special knowledge needed if you want to do advanced things, but at least the basics remain Markdown. Even in RST form, you still had to look up Sphinx syntax. I also make use of a nested directive https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives to implement the prerelease warning. The note about sections referred to another note that got removed in 4c72deb. I presume accidentally, so I have restored that. I also removed the "Update on required toolchains to build LLVM" header because the section is now empty. The other difference is that the table of contents now has a heading "Contents". This is the default and I could not find a way to remove that name. Otherwise it's the same table as you'd get from the RST document.
To keep the original formatting we do need some Sphinx directives still, and those are provided by MyST which is already enabled.
https://myst-parser.readthedocs.io/en/latest/
I did have to enable an extension so we can substitute in the release version.
https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2
Needing to use MyST means there is some special knowledge needed if you want to do advanced things, but at least the basics remain Markdown. Even in RST form, you still had to look up Sphinx syntax.
I also make use of a nested directive
https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives to implement the prerelease warning.
The note about sections referred to another note that got removed in 4c72deb. I presume accidentally, so I have restored that.
I also removed the "Update on required toolchains to build LLVM" header because the section is now empty.
The other difference is that the table of contents now has a heading "Contents". This is the default and I could not find a way to remove that name. Otherwise it's the same table as you'd get from the RST document.