Skip to content

Commit 764a2c9

Browse files
committed
Added some docs
1 parent 992fcfa commit 764a2c9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,29 @@
33
A table of contents for use with [bit-docs-generate-html](https://github.com/bit-docs/bit-docs-generate-html).
44

55
![toc](https://cloud.githubusercontent.com/assets/361671/18181878/6dd11318-705b-11e6-88e1-133c355742c9.gif)
6+
7+
## Use
8+
9+
To use, add bit-docs-html-toc to your bit-docs dependencies in package.json:
10+
11+
```json
12+
{
13+
...
14+
15+
"bit-docs": {
16+
"dependencies": {
17+
"bit-docs-html-toc": "$VERSION"
18+
}
19+
}
20+
}
21+
```
22+
23+
Where `$VERSION` is the latest version on npm.
24+
25+
In your template add a class **on-this-page-container**:
26+
27+
```js
28+
<div class="on-this-page-container"></div>
29+
```
30+
31+
The table of contents will be injected into this element at run time.

0 commit comments

Comments
 (0)