-
Notifications
You must be signed in to change notification settings - Fork 115
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
docs: add myst parser #874
Conversation
[^1]: There is an optimisation implemented for LWT requests that routes them | ||
to the replicas in the ring order (as it prevents contention due to Paxos conflicts), | ||
so replicas in that case are not shuffled in groups at all. | ||
|
||
[^**]: In order for the optimisation to be applied, LWT statements must be prepared before. | ||
so replicas in that case are not shuffled in groups at all. | ||
In order for the optimisation to be applied, LWT statements must be prepared before. |
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.
Reason: MystParser raises an error when trying to include a footnote reference within a footnote.
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
@piodul Could you review and merge this PR? |
I checked out the branch and generated the documentation with:
Unfortunately, I also get a ton of warnings like these:
|
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.
The documentation does not generate properly (with the method I tried, at least - but given that it's just a makefile command, it should work). Please fix it.
Maybe the page I showed was not the best example because it contains links to subpages - and those pages are indeed generated unlike what I wrote earlier - but the This is the same page, but on the current https://rust-driver.docs.scylladb.com/: Note the difference in the menu on the left. |
@annastuchlik I tried with
I'm a bit hesitant to merge this as I'm not sure whether the documentation will look alright after this PR is merged. There seems to be a difference in output between |
@dgarcia360 Could you have a look at the issues @piodul reported? The screenshots and errors are added in the comments above. |
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.
I left a few comments. One other issue, not strictly related to this PR, but I just noticed it and you are touching this region:
When rendering docs using mdbook
(mdbook build docs --open
), toctree
sections are not ignored, and it looks like this:
Those should be somehow marked so that mdbook ignores them.
###### Important: The default authentication credentials are sent in plain text to the server. For this reason, it is highly recommended that this be used in conjunction with client-to-node encryption (SSL), or in a trusted network environment. | ||
|
||
## Important: The default authentication credentials are sent in plain text to the server. For this reason, it is highly recommended that this be used in conjunction with client-to-node encryption (SSL), or in a trusted network environment. |
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.
This was probably meant as a warning box, similar to the one near the beggining of values.md, so instead of reducing the number of #
it should be changed accordingly.
Also, it looks like our docs don't render those boxes very well.
Our docs:
mdbook (mdbook build docs --open
):
This should definitely be fixed, warnings are important and should be visible
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.
Here's the syntax to define admonitions with this new parser: https://myst-parser.readthedocs.io/en/latest/syntax/admonitions.html#admonition-types
And, the subset of admonitions supported by the theme: https://sphinx-theme.scylladb.com/stable/examples/admonitions.html
@Lorak-mmk It seems you're reviewing the docs on GitHub. When it comes to the docs, GitHub is just a fallback. The primary documentation is the published online docs - you can review them with the make |
mdbook is a standard tool for generating Rust book docs, afaik it's not related to GitHub in any way. I strongly feel, that book docs in this repo should be compatible with both mdbook and official docs. Why?
By the way, the only thing in my review that is related to mdbook is the |
Oh, nevermind about the toctree issue @annastuchlik , I started to look into why it doesn't work and saw we already have a solution for that - there is docs/build_book.py script, which copies the source to new dir, removes eval_rst blocks and build the book using mdbook.
and this PR changed the format to
It should be a 1-line change. |
I'll defer to the author @dgarcia360. |
517b67d
to
631b584
Compare
I've rebased the branch and applied the suggested changes. To maintain simplicity in this pull request, I chose not to modify the H1-H6 headings order. Instead, I've suppressed the related warning through the
I believe v0.11.0 was not released at the time of creating the branch for this pull request. I've fixed the issue by adding it to the versions that should keep using recommonmark instead of Myst. |
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.
I no longer see the issues I reported about make multiversionpreview
, so looks good from my point of view.
Related PR: scylladb/sphinx-scylladb-theme#803
This PR replaces Sphinx's deprecated extension recommonmark with myst-parser, as per https://sphinx-theme.scylladb.com/stable/configuration/markdown.html#recommonmark-parser.
How to test
Check the docs build and display without errors.