{"id":18434731,"url":"https://github.com/assemble/grunt-assemble-anchors","last_synced_at":"2026-04-10T03:41:14.058Z","repository":{"id":11734505,"uuid":"14260127","full_name":"assemble/grunt-assemble-anchors","owner":"assemble","description":"Assemble plugin for creating anchor tags from generated html.","archived":false,"fork":false,"pushed_at":"2015-09-24T17:13:05.000Z","size":737,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T23:14:44.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://assemble.github.io/grunt-assemble-anchors/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/assemble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-09T16:13:03.000Z","updated_at":"2015-09-24T17:04:50.000Z","dependencies_parsed_at":"2022-08-28T08:21:25.556Z","dependency_job_id":null,"html_url":"https://github.com/assemble/grunt-assemble-anchors","commit_stats":null,"previous_names":["assemble/assemble-contrib-anchors","assemble/assemble-anchor","assemble/assemble-middleware-anchors"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-anchors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-anchors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-anchors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-anchors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assemble","download_url":"https://codeload.github.com/assemble/grunt-assemble-anchors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844304,"owners_count":21170549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:05:08.206Z","updated_at":"2025-12-12T03:02:15.200Z","avatar_url":"https://github.com/assemble.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-assemble-anchors [![NPM version](https://badge.fury.io/js/grunt-assemble-anchors.svg)](http://badge.fury.io/js/grunt-assemble-anchors)\n\n\u003e Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js.\n\n## Example\n\n## Before\n\n```html\n\u003ch1 id=\"glyphicons\"\u003eGlyphicons\u003c/h1\u003e\n```\n\n## After\n\n```html\n\u003ch1 class=\"docs-heading\"\u003e\n  \u003ca href=\"#heading-id-name\" name=\"heading-id-name\" class=\"anchor\"\u003e\n    \u003cspan class=\"anchor-target\" id=\"heading-id-name\"\u003e\u003c/span\u003e\n    \u003cspan class=\"glyphicon glyphicon-link\"\u003e\u003c/span\u003e\n  \u003c/a\u003e\n  Glyphicons\n\u003c/h1\u003e\n```\n\nCurrently 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)\n\n[![image](https://f.cloud.github.com/assets/383994/1511486/c2414c4e-4aaf-11e3-9c16-30f2993ae2d7.png)](http://getbootstrap.com/components/#glyphicons)\n\nVisit the [anchors example repo](https://github.com/assemble/example-assemble-anchors).\n\n## Quickstart\n\nIn the command line, run:\n\n```bash\nnpm install grunt-assemble-anchors --save\n```\n\nNext, register the plugin with Assemble:\n\n```js\nassemble: {\n  options = {\n    plugins: ['grunt-assemble-anchors', 'other/plugins/*']\n  }\n};\n```\n\n## Options\n\n### template\n\nSpecify a custom template (Underscore/Lo-Dash) to use for anchor markup. This is the default template:\n\n```js\nmodule.exports = [\n  '\u003ca href=\"#\u003c%= id %\u003e\" name=\"\u003c%= id %\u003e\" class=\"anchor\"\u003e',\n  '  \u003cspan class=\"anchor-target\" id=\"\u003c%= id %\u003e\"\u003e\u003c/span\u003e',\n  '  \u003cspan class=\"glyphicon glyphicon-link\"\u003e\u003c/span\u003e',\n  '\u003c/a\u003e'\n].join('\\n');\n```\n\nTo use a custom template just specify it in the options as follows:\n\n```js\noptions: {\n  plugins: ['grunt-assemble-anchors'],\n  anchors: {\n    template: './path/to/custom/template.js'\n  }\n}\n```\n\nVisit the [plugins docs](http://assemble.io/plugins/) for more info or for help getting started.\n\n## Other grunt-assemble plugins\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/assemble/grunt-assemble-anchors/issues/new).\n\n## Author\n\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2015 Brian Woodward\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 24, 2015._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fgrunt-assemble-anchors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassemble%2Fgrunt-assemble-anchors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fgrunt-assemble-anchors/lists"}