From 2ae7f007cc3a1696f1c4e60087fad51571904b2e Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Sun, 27 Mar 2022 17:28:42 +0900 Subject: [PATCH] add doc in mdbook.md --- guide/src/format/mdbook.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guide/src/format/mdbook.md b/guide/src/format/mdbook.md index e4c76f1b..62e89843 100644 --- a/guide/src/format/mdbook.md +++ b/guide/src/format/mdbook.md @@ -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: