MCPcopy Index your code
hub / github.com/aleen42/gitbook-treeview

github.com/aleen42/gitbook-treeview @3.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.0.6 ↗ · + Follow
11 symbols 20 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
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 headers 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
  • ==================== 3.0.0 Refactor release ====================
    • 3.0.1 fix the bug when calculating headers' level
    • 3.0.2 support collapsed option (false by default) #8
    • 3.0.3 use marked to convert markdown into plain text
    • 3.0.6 use gitbook-color to support light or dark theme

:fuelpump: How to contribute

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

:scroll: License

MIT © aleen42

Core symbols most depended-on inside this repo

blockFn
called by 4
lib/index.js
is
called by 4
lib/fn.js
wrap
called by 4
test/index.js
identity
called by 2
lib/index.js
RemoveMarkdown
called by 2
lib/index.js
_calcLevel
called by 2
lib/index.js
generateContent
called by 1
lib/index.js
isNullity
called by 1
lib/fn.js

Shape

Function 11

Languages

TypeScript100%

Modules by API surface

lib/index.js7 symbols
lib/fn.js3 symbols
test/index.js1 symbols

For agents

$ claude mcp add gitbook-treeview \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact