
Code blocks are cool but can be cooler. This plugin adds lines numbers for multi-line blocks and a copy button to easily copy the content of your block.
The next image shows a single line code block:
When displaying code with multiple lines, line numbers will be added:
You only have to edit your book.json and modify it adding something like this:
"plugins" : [ "code" ],
This will set up everything for you. If you want to get rid of the copy buttons use add this section too:
"pluginsConfig": {
"code": {
"copyButtons": false
}
}
Setting | Description | Type | Allowed values |
---|---|---|---|
copyButtons
|
Adds buttons to copy the commands |
Boolean default = true
|
- |
Gitbook plugin to change style of code blocks Forked from davidmogar/gitbook-plugin-code
Latest: 0.0.4
0.0.3, 0.0.4,
GitBook | |
---|---|
0.0.4 | >2.5.0 |