https://github.com/billryan/gitbook-plugin-tags
Tags plugin for GitBook
https://github.com/billryan/gitbook-plugin-tags
gitbook plugin
Last synced: 5 months ago
JSON representation
Tags plugin for GitBook
- Host: GitHub
- URL: https://github.com/billryan/gitbook-plugin-tags
- Owner: billryan
- License: mit
- Created: 2016-09-11T14:30:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T06:24:23.000Z (about 8 years ago)
- Last Synced: 2025-07-19T19:45:50.668Z (6 months ago)
- Topics: gitbook, plugin
- Language: JavaScript
- Size: 14.6 KB
- Stars: 25
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitbook-plugin-tags
[](https://npmjs.org/package/gitbook-plugin-tags) [](https://npmjs.org/package/gitbook-plugin-tags) [](https://npmjs.org/package/gitbook-plugin-tags)
## Tags for GitBook
Since GitBook do not support this feature native, currently I create this plugin to create tags if `tags: xxx` in markdown page or YAML header.
## Usage
### create `tags.md` file and put it into `SUMMARY.md`
Create a file named `tags.md` at the root dir and put it at the last entry of `SUMMARY.md`.
A valid `SUMMARY.md` is:
```
# Summary
* [Introduction](README.md)
* [First Chapter](chapter1.md)
* [Tags](tags.md)
```
You can keep the file `tags.md` empty or add header such as
```
# Tags
```
### add plugin in `book.json`
```
{
"plugins": [
"tags"
],
}
```
### add tags in page
Just drop one line such as
```
tags: tag1, tag2, tag3 is here
```
tags are separated by comma.
### config placement
Tags will show after the title by default, you can config the placement in the bottom.
```
"pluginsConfig": {
"tags": {
"placement": "bottom"
}
}
```
Demo website ==> https://yuanbin.gitbooks.io/test/content/
Enjoy!