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

Build the manual using mdbook and redirect old page #226

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Jan 23, 2025

GitHub actions changes corresponding to rust-lang/rust-analyzer#19015

Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Jan 23, 2025
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on rust-lang#15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Jan 24, 2025
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on rust-lang#15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Jan 24, 2025
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on rust-lang#15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Jan 24, 2025
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on rust-lang#15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Jan 24, 2025
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on rust-lang#15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
@@ -3,6 +3,9 @@ on:
push:
branches:
- src
schedule:
Copy link
Member

Choose a reason for hiding this comment

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

Do we want this? It might be confusing for the users if the manual includes features that aren't available in the stable release yet. I think we should either have nightly and stable versions, or just stable.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, once a week or manually triggered as part of a release seems preferable. I wonder if we can easily setup some form cross repo triggers? (that is once a stable releases CI run finished, trigger CI here?)

Copy link
Member

Choose a reason for hiding this comment

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

Maybe let's add workflow_dispatch too, so we can trigger it manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neat, I didn't know you could do that. Added.

@Wilfred
Copy link
Contributor Author

Wilfred commented Jan 28, 2025

OK, I've rebased and changed the job to run daily, as suggested in this comment.

I don't see an obvious best frequency to run this. Users can run rust-analyzer from rustup (Stable is every six weeks, Nightly is presumably every day for rust-analyzer commits), or from the VS Code extension (released weekly with the latest rust-analyzer), or from their Linux distro (e.g. Arch is roughly weekly).

The nice thing about running more often is contributors seeing their docs fixes reach the site sooner. I suppose it depends on how often docs fixes are version-specific. https://github.com/rust-lang/rust-analyzer/commits/2025-01-27/docs/user/manual.adoc is averaging around 1 change per month, but hopefully we will see more contributions once this lands :)

I'm happy to change to whatever frequency you folks prefer, in any case.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@Wilfred Wilfred force-pushed the build_mdbook branch 2 times, most recently from b718043 to ffdabda Compare January 29, 2025 19:55
@lnicola
Copy link
Member

lnicola commented Jan 29, 2025

Hmm, can we move it to the parent directory so we no longer need the redirect?

@Wilfred
Copy link
Contributor Author

Wilfred commented Jan 29, 2025

Unfortunately mdbook generates an index.html, so using the parent directory means that https://rust-analyzer.github.io/ is entirely replaced with the mdbook content I think.

@lnicola
Copy link
Member

lnicola commented Feb 1, 2025

@Veykril do you have anything against merging this before Monday?

@Veykril
Copy link
Member

Veykril commented Feb 1, 2025 via email

@lnicola lnicola merged commit 4294e14 into rust-analyzer:src Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants