page-treeview

README

page-treeview

gitbook gitbook Pay GitHub issues GitHub license Gitter

npm Build Status devDependency Status npm

a gitbook-plugin for generating a "Treeview" for each page.

page-treeview

Installation

add the following plugins to your book.json and run gitbook install

{
    "plugins": ["page-treeview"]
}

Usage

just find plugin on gitbook and install it on your gitbook project.

configuration option can be set as an obj like, and of course you can use a default value shown as followed:

{
    "plugins": [
        "page-treeview"
    ],
    "pluginsConfig": {
        "page-treeview": {
            "copyright": "Copyright © aleen42",
            "minHeaderCount": "2",
            "minHeaderDeep": "2"
        }
    }
}

What Treeview looks like in Markdown?

Treeview will only generate treeviews for header between level 1 and 6. Here I'll list some cases with different structure (each number means the level a head tag, like 1 for <h1>):

1-1-2-3-4-1
  • 1
  • 1
    • 2
      • 3
        • 4
  • 1
3-4-2-3-4-5-1-2-3
  •  
    •  
      • 3
        • 4
    • 2
      • 3
        • 4
          • 5
  • 1
    • 2
      • 3

1-2-3-1-3-4-5-1-2
  • 1
    • 2
      • 3
  • 1
    •  
      • 3
        • 4
          • 5
  • 1
    • 2

Tests

npm test

Release History

  • ==================== 1.0.0 Initial release ====================
    • 1.5.7 release version
    • 1.5.8 fix bugs
    • 1.5.9 fix bugs of chinese
    • 1.6.1 fix bugs of text indent in markdown style
    • 1.6.9 fix bugs
    • 1.8.0 fix bugs
    • 1.8.3 fix bugs
  • ==================== 2.0.0 Style release ====================
    • 2.0.1 update style
    • 2.0.2 update style
    • 2.0.5 update style
    • 2.0.6 update style
    • 2.0.7 update readme
    • 2.1.3 fix bugs
    • 2.2.1 fix bugs
    • 2.2.2 fix bugs
    • 2.3.0 fix bugs
    • 2.3.4 fix bugs
    • 2.3.5 fix bugs
    • 2.3.7 fix bugs
    • 2.3.8 update readme
    • 2.4.0 update configuration
    • 2.4.1 restrict reading book
    • 2.4.3 fix bugs
    • 2.4.4 fix bugs
    • 2.4.5 update readme
    • 2.4.9 fix bugs
    • 2.5.0 update readme
    • 2.5.8 enhancement for issue #2
    • 2.5.9 update default value
    • 2.6.1 fix bugs
    • 2.6.5 fix bugs
    • 2.6.7 fix bugs
    • 2.6.8 update readme
    • 2.6.9 update readme
    • 2.7.2 fix bugs
    • 2.7.3 update readme
    • 2.7.4 disable console
    • 2.7.7 fix bugs
    • 2.9.5 featuring collapsible lists
    • 2.9.6 update readme
    • 2.9.7 fix bugs
    • 2.9.8 fix the bug of stripping list leader when removing markdown of titles

:fuelpump: How to contribute

Have an idea? Found a bug? See how to contribute.

:scroll: License

MIT © aleen42

Configuration

Setting Description Type Allowed values
copyright Description for your Copyright String
default = Copyright © aleen42
-
minHeaderCount String
default = 1
-
minHeaderDeep String
default = 1
-

Plugin

a gitbook plugin for generating a treeview of each page

https://github.com/aleen42/gitbook-treeview#readme


Latest: 2.9.8

1.5.7, 1.6.1, 1.8.2, 1.8.3, 2.0.0, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.1.5, 2.1.6, 2.2.1, 2.2.4, 2.2.9, 2.3.0, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.9, 2.5.0, 2.5.8, 2.6.5, 2.6.7, 2.6.8, 2.6.9, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.8.7, 2.9.2, 2.9.5, 2.9.6, 2.9.7, 2.9.8,

Requirements

GitBook
2.9.8 >=3.0.0-pre.0

Maintainers

Open on NPM