Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI
on: [push, pull_request]

env:
MDBOOK_VERSION: 0.5.1

jobs:
test:
name: Run tests
Expand All @@ -17,7 +20,7 @@ jobs:
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.45/mdbook-v0.4.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
- name: Report versions
run: |
Expand Down Expand Up @@ -71,10 +74,8 @@ jobs:
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.45/mdbook-v0.4.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
- name: Install mdbook-trpl binaries
run: cargo install --path packages/mdbook-trpl
- name: Install aspell
run: sudo apt-get install aspell
- name: Install shellcheck
Expand Down
2 changes: 1 addition & 1 deletion 2018-edition/book.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[book]
title = "The Rust Programming Language"
author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Community"
authors = ["Steve Klabnik", "Carol Nichols", "Contributions from the Rust Community"]

[output.html]
additional-css = ["ferris.css"]
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ rust-lang/rust uses in [this file][rust-mdbook]. To get it:
$ cargo install mdbook --locked --version <version_num>
```

The book also uses two mdbook plugins which are part of this repository. If you
do not install them, you will see warnings when building and the output will not
look right, but you _will_ still be able to build the book. To use the plugins,
you should run:

```bash
$ cargo install --locked --path packages/mdbook-trpl --force
```

## Building

To build the book, type:
Expand Down
5 changes: 5 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ use-boolean-and = true

# Do not sync this preprocessor; it is for the HTML renderer only.
[preprocessor.trpl-note]
command = "cargo run --manifest-path packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-note"

[preprocessor.trpl-listing]
command = "cargo run --manifest-path packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-listing"
output-mode = "default"

[rust]
edition = "2024"

[build]
extra-watch-dirs = ["packages/mdbook-trpl"]
2 changes: 1 addition & 1 deletion first-edition/book.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[book]
title = "The Rust Programming Language"
author = "The Rust Project Developers"
authors = ["The Rust Project Developers"]
3 changes: 3 additions & 0 deletions nostarch/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ git-repository-url = "https://github.com/rust-lang/book"
build-dir = "../tmp"

[preprocessor.trpl-listing]
command = "cargo run --manifest-path ../packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-listing"
output-mode = "simple"

# Only used in this version, *not* in the root `book.toml`, because its job is
# to remove `<figure>` and `<figcaption>` markup from the version we send them.
[preprocessor.trpl-figure]
command = "cargo run --manifest-path ../packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-figure"
output-mode = "simple"

[preprocessor.trpl-heading]
command = "cargo run --manifest-path ../packages/mdbook-trpl/Cargo.toml --bin mdbook-trpl-heading"
output-mode = "simple"

[rust]
Expand Down
Loading