Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshrotenberg
Copy link

@joshrotenberg joshrotenberg commented Oct 23, 2023

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.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2023
@joshrotenberg
Copy link
Author

joshrotenberg commented Oct 23, 2023

Everybody loves screenshots!

Screenshot 2023-10-23 at 9 38 48 AM Screenshot 2023-10-23 at 9 39 06 AM

@joshrotenberg joshrotenberg mentioned this pull request Oct 23, 2023
10 tasks
@joshrotenberg joshrotenberg force-pushed the mdbook-yolo branch 4 times, most recently from aa0ec91 to a8e8c4f Compare October 25, 2023 02:52
@hw0lff
Copy link

hw0lff commented Oct 25, 2023

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.
I never got any answer if it is desired to overhaul it or not. I think it would improve the configuration docs immensely. Since the PoC uses markdown to render the pages I thought it might fit into a future PR expanding the work here.

Edit: removed confusing "since" at beginning of the second sentence. expand the examples of "important information"

@bors
Copy link
Collaborator

bors commented Nov 11, 2023

☔ The latest upstream changes (presumably #15871) made this pull request unmergeable. Please resolve the merge conflicts.

@joshrotenberg
Copy link
Author

Argh what did I do.

@bors
Copy link
Collaborator

bors commented Nov 12, 2023

☔ The latest upstream changes (presumably #15870) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@Veykril Veykril left a 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.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2023
@joshrotenberg
Copy link
Author

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.

@Veykril
Copy link
Member

Veykril commented Nov 12, 2023

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.

@rustbot
Copy link
Collaborator

rustbot commented Nov 12, 2023

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:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

@bors
Copy link
Collaborator

bors commented Nov 12, 2023

☔ The latest upstream changes (presumably #15882) made this pull request unmergeable. Please resolve the merge conflicts.

@joshrotenberg
Copy link
Author

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.

Done, they should all point to the links that were previously there.

@Veykril
Copy link
Member

Veykril commented Nov 13, 2023

I think you missed updatin http://joshrotenberg.com/rust-analyzer/features/index.html#highlight-related, it looks weird here

@joshrotenberg joshrotenberg force-pushed the mdbook-yolo branch 3 times, most recently from 085a70a to cf9b928 Compare November 13, 2023 17:50
@joshrotenberg
Copy link
Author

I think you missed updatin http://joshrotenberg.com/rust-analyzer/features/index.html#highlight-related, it looks weird here

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");
Copy link
Member

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?

Copy link
Member

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 :-)

Copy link
Author

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

Copy link
Author

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?

@Veykril
Copy link
Member

Veykril commented Nov 14, 2023

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)

Live deploy at http://joshrotenberg.com/rust-analyzer/index.html

@bors
Copy link
Collaborator

bors commented Nov 20, 2023

☔ 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
@bors
Copy link
Collaborator

bors commented Dec 1, 2023

☔ The latest upstream changes (presumably #16000) made this pull request unmergeable. Please resolve the merge conflicts.

@Veykril
Copy link
Member

Veykril commented Dec 1, 2023

Ah sorry, I'll take a final look at this this weekend (and rebase myself if needed)

@Veykril Veykril added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 2, 2024
@joshrotenberg
Copy link
Author

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.

@Veykril
Copy link
Member

Veykril commented Feb 27, 2024

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!

@davidbarsky
Copy link
Contributor

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!

@hw0lff
Copy link

hw0lff commented Feb 29, 2024

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.
Another IMO useful feature would be to build reference docs of config options for previous RA versions too.
Based on the mentioned points, I disagree with this statement in the main comment:

Fixes #9504.


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.
That's why I'd like some clarification on this.

@Veykril
Copy link
Member

Veykril commented Apr 18, 2024

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.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2024
@joshrotenberg
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manual needs to be more helpful, friendly, and better organized
7 participants