|
| 1 | +# mdbook-spec |
| 2 | + |
| 3 | +[`mdbook-spec`] is an mdBook preprocessor that adds features to the Reference. It provides: |
| 4 | + |
| 5 | +- Parsing and generation of [grammar diagrams]. |
| 6 | + - [Automatic grammar production links]. |
| 7 | + - Generation of the [grammar summary appendix]. |
| 8 | +- [Automatic standard library links]. |
| 9 | +- Handling of [rule names]. |
| 10 | + - Validation of the names. |
| 11 | + - Converting rule names to links. |
| 12 | + - [Automatic rule link references]. |
| 13 | + - Generation of [links to rule tests]. |
| 14 | + - Generation of the [test summary]. |
| 15 | +- Support for [admonitions]. |
| 16 | + |
| 17 | +## Environment variables |
| 18 | + |
| 19 | +There are a few environment variables that `mdbook-spec` uses, described in the [building chapter]: |
| 20 | + |
| 21 | +- [`SPEC_RELATIVE`] --- Can be set to link external books to the live site. |
| 22 | +- [`SPEC_DENY_WARNINGS`] --- Whether warnings should be treated as errors. |
| 23 | +- [`SPEC_RUST_ROOT`] --- The path to a checkout of the [`rust-lang/rust`] GitHub repository. This is used for test linking. |
| 24 | + |
| 25 | +[`mdbook-spec`]: https://github.com/rust-lang/reference/tree/master/mdbook-spec |
| 26 | +[`rust-lang/rust`]: https://github.com/rust-lang/rust |
| 27 | +[`SPEC_DENY_WARNINGS`]: building.md#SPEC_DENY_WARNINGS |
| 28 | +[`SPEC_RELATIVE`]: building.md#SPEC_RELATIVE |
| 29 | +[`SPEC_RUST_ROOT`]: building.md#SPEC_RUST_ROOT |
| 30 | +[admonitions]: ../formatting/admonitions.md |
| 31 | +[Automatic grammar production links]: ../grammar.md#automatic-linking |
| 32 | +[Automatic rule link references]: ../links.md#rule-links |
| 33 | +[Automatic standard library links]: ../links.md#standard-library-links |
| 34 | +[Building chapter]: building.md |
| 35 | +[grammar diagrams]: ../grammar.md |
| 36 | +[grammar summary appendix]: https://doc.rust-lang.org/nightly/reference/grammar.html |
| 37 | +[links to rule tests]: ../rules/test-annotations.md |
| 38 | +[rule names]: ../rules/index.md |
| 39 | +[test summary]: https://doc.rust-lang.org/nightly/reference/test-summary.html |
0 commit comments