Skip to content

Config to toggle the run button on codeblocks#1546

Merged
ehuss merged 4 commits into
rust-lang:masterfrom
pineapplehunter:master
Mar 27, 2022
Merged

Config to toggle the run button on codeblocks#1546
ehuss merged 4 commits into
rust-lang:masterfrom
pineapplehunter:master

Conversation

@pineapplehunter
Copy link
Copy Markdown

This PR is for #747.
This adds a flag to the config that toggles the run button on codeblocks.

In book.toml you can write like below to disable all run buttons on codeblocks.

[output.html.playground]
runnable = false

@pineapplehunter pineapplehunter marked this pull request as ready for review March 26, 2022 06:34
@pineapplehunter
Copy link
Copy Markdown
Author

If this needs more tests or docs, I'm happy to help!

@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented Mar 26, 2022

Thanks! Can you also include a small addition to https://github.com/rust-lang/mdBook/blob/master/guide/src/format/mdbook.md#rust-playground about this config option?

@pineapplehunter
Copy link
Copy Markdown
Author

Updated the doc!

Copy link
Copy Markdown
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss merged commit 6cab045 into rust-lang:master Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants