Skip to content

Commit

Permalink
Merge pull request #4135 from rust-lang/mdbook-fixes
Browse files Browse the repository at this point in the history
infra: improve mdbook preprocessing infrastructure
  • Loading branch information
chriskrycho authored Dec 5, 2024
2 parents 397d181 + 7435e9f commit 9900d97
Show file tree
Hide file tree
Showing 27 changed files with 1,516 additions and 2,018 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@ jobs:
- name: Run `tools` package tests
run: |
cargo test
- name: Run `mdbook-trpl-note` package tests
working-directory: packages/mdbook-trpl-note
run: |
cargo test
- name: Run `mdbook-trpl-listing` package tests
working-directory: packages/mdbook-trpl-listing
- name: Run `mdbook-trpl` package tests
working-directory: packages/mdbook-trpl
run: |
cargo test
lint:
Expand All @@ -77,10 +73,8 @@ jobs:
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
- name: Install mdbook-trpl-note
run: cargo install --path packages/mdbook-trpl-note
- name: Install mdbook-trpl-listing
run: cargo install --path packages/mdbook-trpl-listing
- 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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ 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-listing
$ cargo install --locked --path packages/mdbook-trpl-note
$ cargo install --locked --path packages/mdbook_trpl
```

## Building
Expand Down
5 changes: 5 additions & 0 deletions nostarch/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ build-dir = "../tmp"
[preprocessor.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]
output-mode = "simple"

[rust]
edition = "2021"
Loading

0 comments on commit 9900d97

Please sign in to comment.