https://github.com/assemble/grunt-assemble-anchors
Assemble plugin for creating anchor tags from generated html.
https://github.com/assemble/grunt-assemble-anchors
Last synced: about 2 months ago
JSON representation
Assemble plugin for creating anchor tags from generated html.
- Host: GitHub
- URL: https://github.com/assemble/grunt-assemble-anchors
- Owner: assemble
- License: mit
- Created: 2013-11-09T16:13:03.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-09-24T17:13:05.000Z (over 10 years ago)
- Last Synced: 2025-04-11T23:14:44.319Z (about 1 year ago)
- Language: HTML
- Homepage: http://assemble.github.io/grunt-assemble-anchors/
- Size: 720 KB
- Stars: 5
- Watchers: 10
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# grunt-assemble-anchors [](http://badge.fury.io/js/grunt-assemble-anchors)
> Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js.
## Example
## Before
```html
Glyphicons
```
## After
```html
Glyphicons
```
Currently the plugin adds [Bootstrap](http://getbootstrap.com/components/#glyphicons) glyphicon classes. If you want to use different classes, find a bug, or have a feature request, [please create an issue](https://github.com/assemble/grunt-assemble-anchors/issues/new)
[](http://getbootstrap.com/components/#glyphicons)
Visit the [anchors example repo](https://github.com/assemble/example-assemble-anchors).
## Quickstart
In the command line, run:
```bash
npm install grunt-assemble-anchors --save
```
Next, register the plugin with Assemble:
```js
assemble: {
options = {
plugins: ['grunt-assemble-anchors', 'other/plugins/*']
}
};
```
## Options
### template
Specify a custom template (Underscore/Lo-Dash) to use for anchor markup. This is the default template:
```js
module.exports = [
'',
' ',
' ',
''
].join('\n');
```
To use a custom template just specify it in the options as follows:
```js
options: {
plugins: ['grunt-assemble-anchors'],
anchors: {
template: './path/to/custom/template.js'
}
}
```
Visit the [plugins docs](http://assemble.io/plugins/) for more info or for help getting started.
## Other grunt-assemble plugins
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/assemble/grunt-assemble-anchors/issues/new).
## Author
**Brian Woodward**
+ [github/doowb](https://github.com/doowb)
+ [twitter/doowb](http://twitter.com/doowb)
## License
Copyright © 2015 Brian Woodward
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 24, 2015._