Files
book/nostarch/book.toml
Chris Krycho 902612b6d2 infra: create mdbook-trpl-figure preprocessor
Building on the shared infra from `mdbook_trpl`, this preprocessor takes
nicely accessible and semantic HTML input like this:

    <figure>
    
    <img src="https://www.example.com/something.jpg">
    
    <figcaption>Figure 12-34: An illustration of something</figcaption>
    
    </figure>
    
It produces output like this:

    <img src="https://www.example.com/something.jpg">
    
    Figure 12-34: An illustration of something

This matches what we need for the nostarch output. Accordingly, wire up
the `nostarch/book.toml` to use this. There is no need to worry about
ordering of the two preprocessors, because in `Simple` mode the listing
preprocessor emits plain text output for listings (much as this does for
figures).
2024-12-05 09:37:01 -07:00

24 lines
738 B
TOML

[book]
title = "The Rust Programming Language"
authors = ["Steve Klabnik", "Carol Nichols", "Chris Krycho", "Contributions from the Rust Community"]
src = "../src" # needs to be explicit (it is implicit in `/book.toml`).
[output.html]
additional-css = ["../ferris.css", "../theme/2018-edition.css", "../theme/semantic-notes.css"]
additional-js = ["../ferris.js"]
git-repository-url = "https://github.com/rust-lang/book"
[build]
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"