Skip to content

Commit 34c0674

Browse files
committed
Auto merge of #4457 - behnam:book-pub, r=alexcrichton
[doc] Publish book to gh-pages Export mdBook into `target/doc/book/`, to make it accessible at <http://doc.crates.io/book/> I have tested the changes on my repo (but when I had this commit on top of the other PR) locally. The result is at <http://code.behnam.es/rust-cargo/book/>. Tracker: <#4040>
2 parents 61ca302 + b57b66a commit 34c0674

File tree

7 files changed

+13
-4
lines changed

7 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ matrix:
2121
- env: TARGET=x86_64-unknown-linux-gnu
2222
ALT=i686-unknown-linux-gnu
2323
rust: nightly
24+
install:
25+
- cargo install mdbook
2426
script:
2527
- cargo test
2628
- cargo doc --no-deps
@@ -31,7 +33,7 @@ matrix:
3133
[ $(uname -s) = Linux ] &&
3234
pip install ghp-import --user &&
3335
$HOME/.local/bin/ghp-import -n target/doc &&
34-
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages 2>&1 > /dev/null
36+
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages 2>&1 >/dev/null
3537
3638
exclude:
3739
- rust: stable

src/ci/dox.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ for doc in $DOCS; do
2626
-o target/doc \
2727
src/doc/$doc.md
2828
done
29+
30+
# Temporary preview for mdBook docs
31+
cd src/doc/book
32+
$HOME/.cargo/bin/mdbook build --no-create --dest-dir ../../../target/doc/book
33+
cd ../../../

src/doc/MIGRATION_MAP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ index.md book/src/SUMMARY.md book/src/getting-started.md book/src/getting-starte
22
guide.md book/src/guide.md book/src/guide/*.md
33
build-script.md book/src/reference/build-scripts.md
44
config.md book/src/reference/config.md
5-
crates-io.md book/src/reference/crates-io.md
5+
crates-io.md book/src/reference/publishing.md
66
environment-variables.md book/src/reference/environment-variables.md
77
external-tools.md book/src/reference/external-tools.md
88
manifest.md book/src/reference/manifest.md

src/doc/book/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* [Configuration](reference/config.md)
2323
* [Environment Variables](reference/environment-variables.md)
2424
* [Build Scripts](reference/build-scripts.md)
25-
* [Publishing on crates.io](reference/crates-io.md)
25+
* [Publishing on crates.io](reference/publishing.md)
2626
* [Package ID Specifications](reference/pkgid-spec.md)
2727
* [Source Replacement](reference/source-replacement.md)
2828
* [External Tools](reference/external-tools.md)

src/doc/book/src/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The reference covers the details of various areas of Cargo.
1010
* [Configuration](reference/config.html)
1111
* [Environment Variables](reference/environment-variables.html)
1212
* [Build Scripts](reference/build-scripts.html)
13-
* [Publishing on crates.io](reference/crates-io.html)
13+
* [Publishing on crates.io](reference/publishing.html)
1414
* [Package ID Specifications](reference/pkgid-spec.html)
1515
* [Source Replacement](reference/source-replacement.html)
1616
* [External Tools](reference/external-tools.html)

src/doc/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
% Cargo, Rust’s Package Manager
22

3+
# Installing
4+
35
### Install Stable Rust and Cargo
46

57
The easiest way to get Cargo is to get the current stable release of [Rust] by

0 commit comments

Comments
 (0)