Skip to content

Commit 4ce733f

Browse files
committed
Move admonitions to the contributor guide
1 parent 00d7417 commit 4ce733f

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

contributor-guide/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [Tests]()
1010
- [Formatting](formatting/index.md)
1111
- [Markdown](formatting/markdown.md)
12-
- [Admonitions]()
12+
- [Admonitions](formatting/admonitions.md)
1313
- [Language rules]()
1414
- [rustc test annotations]()
1515
- [Examples]()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Admonitions
2+
3+
[`mdbook-spec`](../tooling/mdbook-spec.md) provides admonitions which use a style similar to GitHub-flavored markdown. The style name is placed at the beginning of a blockquote, such as:
4+
5+
```markdown
6+
> [!WARNING]
7+
> This is a warning.
8+
9+
> [!NOTE]
10+
> This is a note.
11+
12+
> [!EDITION-2024]
13+
> This is an edition-specific difference.
14+
15+
> [!EXAMPLE]
16+
> This is an example.
17+
```
18+
19+
The color and styling is defined in [`theme/reference.css`](https://github.com/rust-lang/reference/blob/master/theme/reference.css) and the transformation and icons are in [`mdbook-spec/src/admonitions.rs`](https://github.com/rust-lang/reference/blob/HEAD/mdbook-spec/src/admonitions.rs).
20+
21+
See the [conventions section] for a description of how these should be used.
22+
23+
[conventions section]: https://doc.rust-lang.org/nightly/reference/#conventions

docs/authoring.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,6 @@ When running into a rustdoc limitation, consider manually linking to the correct
141141

142142
[intra]: https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html
143143

144-
### Admonitions
145-
146-
Admonitions use a style similar to GitHub-flavored markdown, where the style name is placed at the beginning of a blockquote, such as:
147-
148-
```markdown
149-
> [!WARNING]
150-
> This is a warning.
151-
152-
> [!NOTE]
153-
> This is a note.
154-
155-
> [!EDITION-2024]
156-
> This is an edition-specific difference.
157-
158-
> [!EXAMPLE]
159-
> This is an example.
160-
```
161-
162-
The color and styling is defined in [`theme/reference.css`](https://github.com/rust-lang/reference/blob/master/theme/reference.css) and the transformation and icons are in [`mdbook-spec/src/admonitions.rs`](https://github.com/rust-lang/reference/blob/HEAD/mdbook-spec/src/admonitions.rs).
163-
164144
## Style
165145

166146
Idioms and styling:

0 commit comments

Comments
 (0)