{"id":18434684,"url":"https://github.com/assemble/grunt-assemble-sitemap","last_synced_at":"2025-04-07T19:31:54.218Z","repository":{"id":10953676,"uuid":"13264451","full_name":"assemble/grunt-assemble-sitemap","owner":"assemble","description":"Assemble middleware for generating sitemaps.","archived":false,"fork":false,"pushed_at":"2017-03-18T02:03:50.000Z","size":92,"stargazers_count":20,"open_issues_count":3,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T20:39:08.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-02T06:48:32.000Z","updated_at":"2024-02-08T12:37:05.000Z","dependencies_parsed_at":"2022-08-28T11:51:19.100Z","dependency_job_id":null,"html_url":"https://github.com/assemble/grunt-assemble-sitemap","commit_stats":null,"previous_names":["assemble/assemble-contrib-sitemap","hariadi/assemble-sitemap","assemble/assemble-middleware-sitemap"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-sitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-sitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-sitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fgrunt-assemble-sitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assemble","download_url":"https://codeload.github.com/assemble/grunt-assemble-sitemap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276188,"owners_count":20912288,"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:04:54.099Z","updated_at":"2025-04-07T19:31:53.905Z","avatar_url":"https://github.com/assemble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-assemble-sitemap [![NPM version](https://img.shields.io/npm/v/grunt-assemble-sitemap.svg?style=flat)](https://www.npmjs.com/package/grunt-assemble-sitemap) [![NPM monthly downloads](https://img.shields.io/npm/dm/grunt-assemble-sitemap.svg?style=flat)](https://npmjs.org/package/grunt-assemble-sitemap)  [![NPM total downloads](https://img.shields.io/npm/dt/grunt-assemble-sitemap.svg?style=flat)](https://npmjs.org/package/grunt-assemble-sitemap) [![Linux Build Status](https://img.shields.io/travis/assemble/grunt-assemble-sitemap.svg?style=flat\u0026label=Travis)](https://travis-ci.org/assemble/grunt-assemble-sitemap) [![Windows Build Status](https://img.shields.io/appveyor/ci/assemble/grunt-assemble-sitemap.svg?style=flat\u0026label=AppVeyor)](https://ci.appveyor.com/project/assemble/grunt-assemble-sitemap)\n\n\u003e Sitemap plugin for Assemble\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Options](#options)\n- [Examples](#examples)\n- [About](#about)\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save grunt-assemble-sitemap\n```\n\n## Usage\n\nRegister the plugin in your assemble config:\n\n```js\nassemble: {\n  options: {\n    plugins: ['grunt-assemble-sitemap', 'other/plugins/*']\n  }\n}\n```\n\nVisit the [plugins docs](http://assemble.io/plugins/) for more info or for help getting started.\n\n## Options\n\nSee [sitemaps.org](http://www.sitemaps.org/protocol.html#xmlTagDefinitions) for detail XML tag definitions.\n\n## dest\n\nType: `String`  \n\nDefault: `undefined`\n\nSitemap destination. If not set, fallback to assemble destination.\n\n## homepage\n\nType: `String`  \n\nDefault: `homepage` (from package.json)\n\nSite URL\n\n## changefreq\n\nType: `String`  \n\nDefault: `weekly`\n\nHow frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are:\n\n* always\n* hourly\n* daily\n* weekly\n* monthly\n* yearly\n* never\n\n## priority\n\nType: `Float`  \n\nDefault: `0.5`\n\nThe priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.\n\n## exclude\n\nType: `Array`  \n\nDefault: `['404']`\n\nPages to omit from the sitemap.\n\n```js\noptions: {\n  sitemap: {\n    exclude: [\"foo\", \"bar\"],\n  },\n  files: {\n    ...\n  }\n}\n```\n\n## relativedest\n\nType: `String` / `Boolean`  \n\nDefault: `false`\n\nPath to which the URLs in Sitemap and Robots should be relative to. `true` is equal to the destination path `dest` and `false` is equal to the root directory.\n\n## basename\n\nType: `String`\nDefault: `sitemap.xml`\n\nIf you have a master sitemap that references sub-sitemaps, use this feature. For example `static-sitemap.xml`\n\n## robot\n\nType: `Boolean`  \n\nDefault: `true`\n\nGenerate robots.txt from `exclusions` list.\n\n## pretty\n\nType: `Boolean`\nDefault: `false`\n\nWhen generating a sitemap with directory indexes, use pretty urls by removing `index` path segments from `http://www.example.com/directory/index.html` to to create `http://www.example.com/directory/`\n\n## Simple\n\nTo simplify might do something like:\n\n```js\nassemble: {\n  blog: {\n    options: {\n      plugins: ['grunt-assemble-sitemap'],\n    },\n    files: {\n      './blog/': ['./templates/blog/*.hbs']\n    }\n  }\n}\n\n```\n\n## Result\n\n```js\n./blog/sitemap.xml\n./blog/robots.txt\n```\n\n## Advanced\n\n```js\nassemble: {\n  blog: {\n    options: {\n      plugins: ['grunt-assemble-sitemap'],\n      sitemap: {\n        homepage: 'http://assemble.io',\n            changefreq: 'daily',\n            priority: '0.8',\n            exclude: ['50x', 'foo'],\n            robot: false\n      }\n    },\n    files: {\n      './blog/': ['./templates/blog/*.hbs']\n    }\n  }\n}\n```\n\n## Result\n\n```js\n./blog/sitemap.xml\n```\n\n## About\n\n### Related projects\n\n* [grunt-assemble-anchors](https://www.npmjs.com/package/grunt-assemble-anchors): Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js. | [homepage](https://github.com/assemble/grunt-assemble-anchors#readme \"Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js.\")\n* [grunt-assemble-contextual](https://www.npmjs.com/package/grunt-assemble-contextual): Generates a JSON file with the context of each page. Basic plugin to help see… [more](https://github.com/assemble/grunt-assemble-contextual) | [homepage](https://github.com/assemble/grunt-assemble-contextual \"Generates a JSON file with the context of each page. Basic plugin to help see what's happening in the build.\")\n* [grunt-assemble-decompress](https://www.npmjs.com/package/grunt-assemble-decompress): Assemble plugin for extracting zip, tar and tar.gz archives. | [homepage](https://github.com/assemble/grunt-assemble-decompress \"Assemble plugin for extracting zip, tar and tar.gz archives.\")\n* [grunt-assemble-download](https://www.npmjs.com/package/grunt-assemble-download): Assemble plugin for downloading files from GitHub. | [homepage](https://github.com/assemble/grunt-assemble-download \"Assemble plugin for downloading files from GitHub.\")\n* [grunt-assemble-i18n](https://www.npmjs.com/package/grunt-assemble-i18n): Plugin for adding i18n support to Assemble projects. | [homepage](https://github.com/assemble/grunt-assemble-i18n \"Plugin for adding i18n support to Assemble projects.\")\n* [grunt-assemble-lunr](https://www.npmjs.com/package/grunt-assemble-lunr): Assemble plugin for adding search capabilities to your static site, with lunr.js. | [homepage](http://assemble.io \"Assemble plugin for adding search capabilities to your static site, with lunr.js.\")\n* [grunt-assemble-navigation](https://www.npmjs.com/package/grunt-assemble-navigation): Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for… [more](https://github.com/assemble/grunt-assemble-navigation) | [homepage](https://github.com/assemble/grunt-assemble-navigation \"Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for a demonstration.\")\n* [grunt-assemble-permalinks](https://www.npmjs.com/package/grunt-assemble-permalinks): Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin… [more](https://github.com/assemble/grunt-assemble-permalinks) | [homepage](https://github.com/assemble/grunt-assemble-permalinks \"Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin enables powerful and configurable URI patterns, [Moment.js](http://momentjs.com/) for parsing dates, much more.\")\n* [grunt-assemble-sitemap](https://www.npmjs.com/package/grunt-assemble-sitemap): Sitemap plugin for Assemble | [homepage](http://assemble.io/plugins \"Sitemap plugin for Assemble\")\n* [grunt-assemble-toc](https://www.npmjs.com/package/grunt-assemble-toc): Assemble middleware for adding a Table of Contents (TOC) to any HTML page. | [homepage](http://assemble.io \"Assemble middleware for adding a Table of Contents (TOC) to any HTML page.\")\n* [grunt-assemble-wordcount](https://www.npmjs.com/package/grunt-assemble-wordcount): Assemble plugin for displaying wordcount and average reading time to blog posts or pages. | [homepage](https://github.com/assemble/grunt-assemble-wordcount \"Assemble plugin for displaying wordcount and average reading time to blog posts or pages.\")\n* [grunt-assemble](https://www.npmjs.com/package/grunt-assemble): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt… [more](http://assemble.io) | [homepage](http://assemble.io \"Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt, Less.js / lesscss.org, Topcoat, Web Experience Toolkit, and hundreds of other projects to build sites, themes, components, documentation, blogs and gh\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 64 | [hariadi](https://github.com/hariadi) |\n| 11 | [doowb](https://github.com/doowb) |\n| 7 | [rauberdaniel](https://github.com/rauberdaniel) |\n| 7 | [hgoebl](https://github.com/hgoebl) |\n| 2 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 1 | [quartzmo](https://github.com/quartzmo) |\n| 1 | [jarrodconnolly](https://github.com/jarrodconnolly) |\n| 1 | [Melindrea](https://github.com/Melindrea) |\n| 1 | [olegsmetanin](https://github.com/olegsmetanin) |\n\n### Release history\n\n2017-03-16      **v0.2.6**\n\n* Add `option.basename` to specify the basename of the output file. Defaults to `sitemap.xml`.\n* Add `option.pretty` to remove `index.html` from paths.\n* Repo code clean up.\n\n2014-05-31      **v0.2.5**\n\n* fix sitemap and robots not generated\n* relativedest can be a path now\n\n2014-05-31      **v0.2.4**\n\n* added sitemap URL to robots.txt\n* added relativedest to options\n\n2014-05-02      **v0.2.3**\n\n* fixes toc\n* Change docs to use verb\n\n2014-03-25      **v0.2.2**\n\n* Change from plugin to middleware\n\n2014-02-20      **v0.2.1**\n\n* fix option.robot was ignored and always true  0159123\n* (feat) add option.dest and use as output path\n* fix option.robot was ignored and always true\n* (feat) add option to overwrite changefreq per file\n* cosmetical changes (code formatting, naming, simplify)\n* (wip) enable globbing patterns for option.exclude\n\n2014-02-04      **v0.2.0**\n\n* Generation of robots.txt will now respect the relativedest option.\n\n2014-02-01      **v0.1.9**\n\n* Fix sitemap destination\n\n2014-01-27      **v0.1.8**\n\n* Use external library\n* Get pages from assemble object\n\n2014-01-02      **v0.1.7**\n\n* Add relativedest option\n\n2013-12-11      **v0.1.6**\n\n* Fix plugin name in Usage Examples\n* Update deps\n\n2013-11-27      **v0.1.4**\n\n* Updates dependencies to work with Grunt 0.4.2\n* [object Object]\n* Add TOC to docs\n\n2013-10-19      **v0.1.3**\n\n* Fix sitemap and robots.txt generated on every folder\n* Update docs options:exclusions\n\n2013-10-17      **v0.1.2**\n\n* Fix homepage\n\n2013-10-16      **v0.1.1**\n\n* Add option to generate robots.txt\n* Change name to assemble-contrib.sitemap\n* Move to Assemble main repo\n\n2013-09-30      **v0.1.0**\n\n* First commmit.\n* Add option to exclude\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Hariadi Hinta**\n\n* [github/hariadi](https://github.com/hariadi)\n* [twitter/hariadi](https://twitter.com/hariadi)\n\n### License\n\nCopyright © 2017, [Hariadi Hinta](https://github.com/hariadi).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 17, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fgrunt-assemble-sitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassemble%2Fgrunt-assemble-sitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fgrunt-assemble-sitemap/lists"}