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 manual to markdown/mdbook #15795
base: master
Are you sure you want to change the base?
Conversation
aa0ec91
to
a8e8c4f
Compare
Some time ago I made a proof-of-concept for a better configuration page. The information on the current site is lacking important information such as possible configuration values for enums (and their description) or values of previous rust-analyzer version if anyone cannot use the newest version. Edit: removed confusing "since" at beginning of the second sentence. expand the examples of "important information" |
☔ The latest upstream changes (presumably #15871) made this pull request unmergeable. Please resolve the merge conflicts. |
a8e8c4f
to
5fcf528
Compare
Argh what did I do. |
d9b8f08
to
f160f31
Compare
☔ The latest upstream changes (presumably #15870) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Can we no longer link to images/gifs with this setup? I'd really rather us not having to put the images/gifs into the repo.
We can, no problem. I thought it might be easier to manage them in the same place as the docs but either way works. I can go through and fix all the links. |
Adding the images to the repo increases the repo size, which would be fine for just a few images, but we might add more, might update some etc. And it's not much of a management burden to handle links like this, so I'd prefer keeping the images out of the repo for the time being. |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
☔ The latest upstream changes (presumably #15882) made this pull request unmergeable. Please resolve the merge conflicts. |
e4e0df5
to
d78f3e0
Compare
Done, they should all point to the links that were previously there. |
54f8c7e
to
3afdf72
Compare
I think you missed updatin http://joshrotenberg.com/rust-analyzer/features/index.html#highlight-related, it looks weird here |
085a70a
to
cf9b928
Compare
Fixed! |
@@ -2612,7 +2601,7 @@ mod tests { | |||
|
|||
#[test] | |||
fn generate_config_documentation() { | |||
let docs_path = project_root().join("docs/user/generated_config.adoc"); | |||
let docs_path = project_root().join("docs/book/src/configuration/generated.md"); |
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 either need to keep this file checked in as before, or change this test to just generate the file without checking it. I don't recall why we had this file checked in in the first place though (whereas other files were not). @matklad do you remember?
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 don’t really remember, though perhaps the goal was to have a stand-alone .adoc available in the repo?
It renders ok on GitHub:
https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/manual.adoc#configuration
(note that you can click on the link to generated config).
MDBook also has this nice property that links in the source, rendered on GitHub, and rendered on the website work the same, so I’d keep the generated source checked in.
Sorry for picking adoc back then instead of markdown! My hypothesis was that rust-analyzer’s own docs would be a temporary thing, until we merge with rustc, so I decided to experiment instead of picking something long-term maintainable by community :-)
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.
MDBook also has this nice property that links in the source, rendered on GitHub, and rendered on the website work the same, so I’d keep the generated source checked in.
I agree. In theory we could just keep all four generated files checked in, making them available both in the repo and as part of the deployed mdbook.
Let me know what you want to do and I can make the changes (for this one or all of them).
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.
Any thoughts on how to deal with this?
r? @lnicola if you have the time, would you mind giving this a quick look as well (and share your opinions on this if you have any)
|
cf9b928
to
b09b661
Compare
☔ The latest upstream changes (presumably #15885) made this pull request unmergeable. Please resolve the merge conflicts. |
manual.adoc to markdown add entire static manual and toc move generated adoc to md in book dir add features add features add assists add config add diagnostics split up book, clean up links update book config add intro remove old docs, add a README clean up ignores add temporary workflow temporary makefile remove workflow Fix import preference config keys convert manual to mdbook manual.adoc to markdown add entire static manual and toc move generated adoc to md in book dir add features add features add assists add config add diagnostics split up book, clean up links update book config add intro remove old docs, add a README clean up ignores add temporary workflow temporary makefile remove workflow remove generated config.md rework generated locations and ignores remove img, replace with externally linked remove img, replace with externally linked these should be gone remove these fix kbd Co-authored-by: Lukas Wirth <lukastw97@gmail.com> fix md header smaller header fix highlight_related list update book readme
b09b661
to
9e8005c
Compare
☔ The latest upstream changes (presumably #16000) made this pull request unmergeable. Please resolve the merge conflicts. |
Ah sorry, I'll take a final look at this this weekend (and rebase myself if needed) |
I have some free time in the next few weeks to handle any issues/additions on this if there is still interest in pushing it through. |
I'm sorry that i still haven't merged this 😓 I wanted to get a second opinion but that never came up I guess. I still very much want this! |
I think I like the current design of the site more, but I think mdbook's ease of contribution outweighs that, IMO. I'm personally onboard with this! |
I am looking forward to this being merged. It lays a ground for more improvements, e.g. better reference documentation for configuration options. The current design is insufficient for the sheer number of options RA has.
I never got written feedback on the issues 1 2 I raised and ideas I proposed in a PoC. I don't want to put effort into a PR that won't be merged because it's not aligned with the opinions of the maintainers. |
SO we are currently redesigning the config stuff meaning this has conflicts yet again (because I still haven't gotten back to it), and there will be new ones once thats completed. So I'll wait with this until that redesign is finished, then I'll rebase it and get it over, don't want you to put more and more time in just to wait again (unless thats your kind of thing 😶). That change should also allow us to more easily address the fact that the documentation is not showing all config options which can do as a follow up. Again really sorry this is taking so long to get in. |
No problem, I'm here when you're ready. |
Ok, let's try this one more time!
Comments/reviews appreciated. This time it's just about bare bones moving the manual from adoc to mdbook.
Live deploy at http://joshrotenberg.com/rust-analyzer/index.html
Fixes #9504.