mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 14:22:35 +00:00
add doc in mdbook.md
This commit is contained in:
parent
89e37a7751
commit
2ae7f007cc
1 changed files with 8 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue