This is a GitBook plug-in to add chapter number before the H1, H2, or H3 tag.
Add this plug-in to your book.json
configuration:
{
"plugins": ["chapter-numbering"]
}
Install this plug-in using the following code:
$ gitbook install
This plug-in adds <span class="chapter">(chapter number)</span>
in H1, H2, or H3 tag.
To adjust the layout, add the following code in your css.
span.chapter {
padding-right: .5em;
}
-
Run the following command to insert this plug-in into package.json:
$ npm install --save gitbook-plugin-chapter-numbering
- This plug-in uses the
Cheerio
npm package to parse HTML as dependencies. run the following command to installCheerio
to your environment.$ npm install --save Cheerio