Socket
Socket
Sign inDemoInstall

gitbook-plugin-parts-autoindex

Package Overview
Dependencies
28
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitbook-plugin-parts-autoindex

Prepend summary index to each part title GitBook


Version published
Maintainers
1
Created

Readme

Source

Gitbook Plugin Parts Auto Index

A gitbook plugin prepend the index level (from summary) into every h1, h2, ..., title

Install

Add this to your book.json, then run gitbook install:

{
    "plugins": ["parts-autoindex"]
}

Setup

In your book.json add

{
	"pluginsConfig": {
		"parts-autoindex": {
			"level": 2,
			"trim": 1,
			"offset": -1
		}
	}
}

Where:

  • level: [optional, default: 3]. The number until which to prepend the level number eg: 1 = only to h1, 2 = h1, h2, 3 = h1, h2, h3, ...
  • trim: [optional, default: 0]. The amount on numbers to trim from the left from the summary level numbers, eg: 2.3.6 (trim=1) -> 3.6, useful when not using parts
  • offset: [optional, default: 0]. Offset to add/substract from the level, eg: 3.6 (offset=1) -> 4.6, (offset=-1) -> 2.6

FAQs

Last updated on 11 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc