Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 9, 2019. It is now read-only.

GitBook plugin: Creates a table of content (TOC) for a page in your Gitbook

License

stuebersystems/gitbook-plugin-simple-page-toc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

Gitbook Simple Page TOC Plugin npm version

This plugin inserts a table of content (TOC) section into your GitBook page. It is powered by the markdown-toc library.

Usage

Installation

Add the plugin to your book.json:

{
	"plugins" : [ "simple-page-toc" ]
}		

Create TOC

Place a <!-- toc --> code comment somewhere into your text. Generating your GitBook inserts a table of contents immediately after this comment.

Optional configuration

You can add the following configuration params to your book.json:

{
	"plugins" : [ 
		"simple-page-toc" 
	],
	"pluginsConfig": {
		"simple-page-toc": {
			"maxDepth": 3,
			"skipFirstH1": true
  		}
	}
}			
Name Type Default Description
maxDepth Number 3 Use headings whose depth is at most maxdepth.
skipFirstH1 Boolean true Exclude the first h1-level heading in a file.

Changelog

  • 0.1.0 Releases:
    • 0.1.0 First release
    • 0.1.1 Fixed invalid config example in README (thanks at15)
    • 0.1.2 Fixed bug: Titles with hyphen builds with wrong anchor link

About

GitBook plugin: Creates a table of content (TOC) for a page in your Gitbook

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /