Skip to content

Commit c590bc8

Browse files
committed
Add a chapter describing mdbook-spec
1 parent 429ce83 commit c590bc8

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

contributor-guide/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- [Publishing process](publishing.md)
66
- [Reference tooling]()
77
- [Building the Reference](tooling/building.md)
8-
- [mdbook-spec]()
8+
- [mdbook-spec](tooling/mdbook-spec.md)
99
- [Tests]()
1010
- [Formatting]()
1111
- [Markdown]()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# mdbook-spec
2+
3+
[`mdbook-spec`](https://github.com/rust-lang/reference/tree/master/mdbook-spec) is an mdBook preprocessor that adds features to the Reference. It provides:
4+
5+
- Parsing and generation of [grammar diagrams](../grammar.md).
6+
- [Automatic grammar production links](../grammar.md#automatic-linking).
7+
- Generation of the [grammar summary appendix](https://doc.rust-lang.org/nightly/reference/grammar.html).
8+
- [Automatic standard library links](../links.md#standard-library-links).
9+
- Handling of [rule names](../rules.md).
10+
- Validation of the names.
11+
- Converting rule names to links.
12+
- [Automatic rule link references](../links.md#rule-links).
13+
- Generation of [links to rule tests](../rules/test-annotations.md).
14+
- Generation of the [test summary](https://doc.rust-lang.org/nightly/reference/test-summary.html).
15+
- Support for [admonitions](../formatting/admonitions.md).
16+
17+
## Environment variables
18+
19+
There are a few environment variables that `mdbook-spec` uses, described in the [Building chapter](building.md):
20+
21+
- [`SPEC_RELATIVE`](building.md#SPEC_RELATIVE) --- Can be set to link external books to the live site.
22+
- [`SPEC_DENY_WARNINGS`](building.md#SPEC_DENY_WARNINGS) --- Whether warnings should be treated as errors.
23+
- [`SPEC_RUST_ROOT`](building.md#SPEC_RUST_ROOT) --- The path to a checkout of the [`rust-lang/rust`](https://github.com/rust-lang/rust) GitHub repository. This is used for test linking.

0 commit comments

Comments
 (0)