menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right ... chevron_right node_modules chevron_right gitbook-plugin-code
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    lightbulb_outline README

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