Skip to content

[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

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

DavidSpickett
Copy link
Collaborator

  • 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.

@DavidSpickett
Copy link
Collaborator Author

Copy link

github-actions bot commented Sep 18, 2024

✅ With the latest revision this PR passed the Python code formatter.

* 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.
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DavidSpickett DavidSpickett merged commit b9f09a4 into llvm:main Sep 26, 2024
7 of 9 checks passed
@DavidSpickett DavidSpickett deleted the md-docs branch September 26, 2024 13:15
@DavidSpickett
Copy link
Collaborator Author

DavidSpickett commented Sep 26, 2024

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:
https://www.markdownguide.org/basic-syntax/#links
https://www.markdownguide.org/basic-syntax/#code

This can be previewed on GitHub to check you have done this correctly ("Display Rich Diff" in the code review section).

Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Sep 27, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants