Skip to content

TGhoul/gitbook-plugin-code

This branch is 3 commits ahead of davidmogar/gitbook-plugin-code:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4bbb29d · Nov 1, 2018

History

8 Commits
Nov 1, 2018
Feb 4, 2018
Feb 4, 2018
Feb 4, 2018
Nov 1, 2018

Repository files navigation

Code plugin for GitBook

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.

Cool, can I see it working?

The next image shows a single line code block:

single line

When displaying code with multiple lines, line numbers will be added:

multi line

How can I use this plugin?

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
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.7%
  • CSS 15.3%