add doc in mdbook.md

This commit is contained in:
Shogo Takata 2022-03-27 17:28:42 +09:00
parent 89e37a7751
commit 2ae7f007cc
No known key found for this signature in database
GPG Key ID: 93C92BE128D78ED2
1 changed files with 8 additions and 1 deletions

View File

@ -41,7 +41,7 @@ println!("Hello, World!");
If there is no `main` function, then the code is automatically wrapped inside one.
If you wish to disable the play button, you can include the `noplayground` option on the code block like this:
If you wish to disable the play button for a code block, you can include the `noplayground` option on the code block like this:
~~~markdown
```rust,noplayground
@ -51,6 +51,13 @@ println!("Hello {}!", name);
```
~~~
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.
```toml
[output.html.playground]
runnable = false
```
## Rust code block attributes
Additional attributes can be included in Rust code blocks with comma, space, or tab-separated terms just after the language term. For example: