Skip to content

Latest commit

 

History

History
154 lines (123 loc) · 4.55 KB

README.md

File metadata and controls

154 lines (123 loc) · 4.55 KB

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

⛽ How to contribute

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

📜 License

MIT © aleen42

Note: if you like this project, feel free to buy me a swimming chance:

badges badges badges