Skip to content

Commit

Permalink
Move the changelog to the cargo book (#15119)
Browse files Browse the repository at this point in the history
This moves cargo's changelog to the cargo book. We're bumping into
rendering limits on GitHub's side, so we're moving the changelog to the
cargo book where it can be statically served under our control.

This PR is structured in such a way that the original CHANGELOG.md file
is kept in place (and history is preserved in the new copy). The intent
is to wait until this PR makes it to the nightly channel, and then open
a new PR that will delete the original. That will look something like
ehuss@5ce7947.

This makes use of a new mdbook feature in order to exclude the changelog
chapter from the search index. It completely swamps the search results,
so I think it is best to just exclude it.

We'll need to coordinate with the release team so that future release
notes link directly to the cargo book instead of GitHub.
  • Loading branch information
weihanglo authored Jan 29, 2025
2 parents 26ce027 + 790c776 commit 5a882c1
Show file tree
Hide file tree
Showing 8 changed files with 6,167 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.44/mdbook-v0.4.44-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Deploy docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.44/mdbook-v0.4.44-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- run: cd src/doc && mdbook build --dest-dir ../../target/doc
- name: Run linkchecker.sh
Expand Down
7 changes: 6 additions & 1 deletion src/doc/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ author = "Alex Crichton, Steve Klabnik and Carol Nichols, with contributions fro
smart-punctuation = true # Enable smart-punctuation feature for more than quotes.
git-repository-url = "https://github.com/rust-lang/cargo/tree/master/src/doc/src"
edit-url-template = "https://github.com/rust-lang/cargo/edit/master/src/doc/{path}"
search.use-boolean-and = true

[output.html.search]
use-boolean-and = true

[output.html.search.chapter]
"CHANGELOG.md" = { enable = false }

[output.html.redirect]
"/guide/build-cache.html" = "../reference/build-cache.html"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/contrib/src/process/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ The process here is similar to the beta-backporting process. The
[choochoo]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
[rust-lang/rust]: https://github.com/rust-lang/rust/
[rust-lang/cargo]: https://github.com/rust-lang/cargo/
[CHANGELOG]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md
[CHANGELOG]: https://github.com/rust-lang/cargo/blob/master/src/doc/src/CHANGELOG.md
[release process]: https://forge.rust-lang.org/release/process.html
[`TargetInfo`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/build_context/target_info.rs
[crates.io]: https://crates.io/
Expand Down
2 changes: 1 addition & 1 deletion src/doc/contrib/src/process/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ Post release:
[GHSA-r5w3-xm58-jv6j]: https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j
[handling reports]: https://github.com/rust-lang/wg-security-response/blob/main/docs/handling-reports.md
[first-guide]: https://www.first.org/cvss/user-guide
[`CHANGELOG.md`]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md
[`CHANGELOG.md`]: https://github.com/rust-lang/cargo/blob/master/src/doc/src/CHANGELOG.md
[`Cargo.toml`]: https://github.com/rust-lang/cargo/blob/master/Cargo.toml
[`RELEASES.md`]: https://github.com/rust-lang/rust/blob/master/RELEASES.md
6,155 changes: 6,155 additions & 0 deletions src/doc/src/CHANGELOG.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/doc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@
* [Deprecated and Removed](commands/deprecated-and-removed.md)

* [FAQ](faq.md)
* [Changelog](CHANGELOG.md)
* [Appendix: Glossary](appendix/glossary.md)
* [Appendix: Git Authentication](appendix/git-authentication.md)
2 changes: 1 addition & 1 deletion src/doc/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The commands will let you interact with Cargo using its command-line interface.
* [Git Authentication](appendix/git-authentication.md)

**Other Documentation:**
* [Changelog](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md)
* [Changelog](CHANGELOG.md)
--- Detailed notes about changes in Cargo in each release.
* [Rust documentation website](https://doc.rust-lang.org/) --- Links to official
Rust documentation and tools.
Expand Down

0 comments on commit 5a882c1

Please sign in to comment.