From ab30710e716446f529d1d5da4430c209d8f3897d Mon Sep 17 00:00:00 2001 From: jofas Date: Thu, 12 Jan 2023 12:19:42 +0100 Subject: [PATCH 1/4] replaced all occurences of doc.crates.io/contrib/apidoc/cargo with doc.rust-lang.org/nightly/nightly-rustc/cargo --- CHANGELOG.md | 2 +- src/cargo/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8540fe7194..c663e4f7bfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -235,7 +235,7 @@ - External subcommands can now inherit jobserver file descriptors from Cargo. [#10511](https://github.com/rust-lang/cargo/pull/10511) - Added an API documentation for private items in cargo-the-library. See - . + . [#11019](https://github.com/rust-lang/cargo/pull/11019) ### Changed diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index f6aadcce94d..201d4316915 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -14,7 +14,7 @@ //! There are two places you can find API documentation of cargo-the-library, //! //! - and -//! - . +//! - . //! //! Each of them targets on a slightly different audience. //! @@ -33,7 +33,7 @@ //! //! ## For Cargo contributors //! -//! The documentation on contains all items in Cargo. +//! The documentation on contains all items in Cargo. //! Contributors of Cargo may find it useful as a reference of Cargo's implementation details. //! It's built with `--document-private-items` rustdoc flag, //! so you might expect to see some noise and strange items here. From e9f599a8fc57b0ff0c106d86debe848cd7d710e7 Mon Sep 17 00:00:00 2001 From: jofas Date: Thu, 12 Jan 2023 13:58:45 +0100 Subject: [PATCH 2/4] redirect contrib/apidoc/cargo/ to new hosting location of cargo api docs --- src/doc/contrib/book.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doc/contrib/book.toml b/src/doc/contrib/book.toml index 878d039350d..ee5264cb4ff 100644 --- a/src/doc/contrib/book.toml +++ b/src/doc/contrib/book.toml @@ -4,3 +4,6 @@ authors = ["Eric Huss"] [output.html] git-repository-url = "https://github.com/rust-lang/cargo/tree/master/src/doc/contrib/src" + +[output.html.redirect] +"/apidoc/cargo/" = "https://doc.rust-lang.org/nightly/nightly-rustc/cargo/" From 7bd86d207c390fee938da34214f463b24ddd1ab4 Mon Sep 17 00:00:00 2001 From: jofas Date: Thu, 12 Jan 2023 14:03:30 +0100 Subject: [PATCH 3/4] removed steps for api doc creation from action --- .github/workflows/contrib.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 5eebc87f65c..1872ae11ce6 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -21,11 +21,6 @@ jobs: mkdir mdbook curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.9/mdbook-v0.4.9-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook echo `pwd`/mdbook >> $GITHUB_PATH - - name: Update toolchain - run: rustup update --no-self-update stable && rustup default stable - - name: Build API doc - run: | - cargo doc --document-private-items --no-deps - name: Deploy docs run: | cd src/doc/contrib @@ -38,8 +33,6 @@ jobs: git update-ref -d refs/heads/gh-pages rm -rf contrib mv ../book contrib - # Move rustdoc under contrib/ - mv ../../../../target/doc contrib/apidoc git add contrib git commit -m "Deploy $GITHUB_SHA to gh-pages" git push --force From 9fec8d637715646ab5e0045c7bf37bdffdf43330 Mon Sep 17 00:00:00 2001 From: Jonas Fassbender <20799702+jofas@users.noreply.github.com> Date: Thu, 12 Jan 2023 19:13:53 +0100 Subject: [PATCH 4/4] Update src/doc/contrib/book.toml Co-authored-by: Weihang Lo --- src/doc/contrib/book.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/contrib/book.toml b/src/doc/contrib/book.toml index ee5264cb4ff..543d58576bd 100644 --- a/src/doc/contrib/book.toml +++ b/src/doc/contrib/book.toml @@ -6,4 +6,4 @@ authors = ["Eric Huss"] git-repository-url = "https://github.com/rust-lang/cargo/tree/master/src/doc/contrib/src" [output.html.redirect] -"/apidoc/cargo/" = "https://doc.rust-lang.org/nightly/nightly-rustc/cargo/" +"/apidoc/cargo/index.html" = "https://doc.rust-lang.org/nightly/nightly-rustc/cargo/"