Skip to content

Commit 2ae7f00

Browse files
author
Shogo Takata
committed
add doc in mdbook.md
1 parent 89e37a7 commit 2ae7f00

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

guide/src/format/mdbook.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ println!("Hello, World!");
4141

4242
If there is no `main` function, then the code is automatically wrapped inside one.
4343

44-
If you wish to disable the play button, you can include the `noplayground` option on the code block like this:
44+
If you wish to disable the play button for a code block, you can include the `noplayground` option on the code block like this:
4545

4646
~~~markdown
4747
```rust,noplayground
@@ -51,6 +51,13 @@ println!("Hello {}!", name);
5151
```
5252
~~~
5353

54+
Or, if you wish to disable the play button for all code blocks in your book, you can write the config to the `book.toml` like this.
55+
56+
```toml
57+
[output.html.playground]
58+
runnable = false
59+
```
60+
5461
## Rust code block attributes
5562

5663
Additional attributes can be included in Rust code blocks with comma, space, or tab-separated terms just after the language term. For example:

0 commit comments

Comments
 (0)