Skip to content
Assemble middleware for generating sitemaps.
JavaScript HTML
Find file
Latest commit c76d6ca @doowb doowb updating related list
Failed to load latest commit information.
docs updating docs and rebuilding with verb
test running tests
.editorconfig update
.gitattributes update
.gitignore update
.travis.yml Update .travis.yml updating changelog
Gruntfile.js renaming to grunt-assemble-sitemap and removing grunt-verb
LICENSE update updating related list
index.js update
package.json updating related list

grunt-assemble-sitemap NPM version Build Status

Sitemap plugin for Assemble

Table of Contents

(Table of contents generated by [verb])

$ npm i grunt-assemble-sitemap --save

Next, register the plugin with Assemble:

assemble: {
  options: {
    plugins: ['grunt-assemble-sitemap', 'other/plugins/*']

Visit the plugins docs for more info or for help getting started.


See for detail XML tag definitions.


Type: String

Default: undefined

Sitemap destination. If not set, fallback to assemble destination.


Type: String

Default: homepage (from package.json)

Site URL


Type: String

Default: weekly

How 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:

  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never


Type: Float

Default: 0.5

The 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.


Type: Array

Default: ['404']

Pages to omit from the sitemap.

options: {
  sitemap: {
    exclusions: ["foo", "bar"],
  files: {


Type: String / Boolean

Default: false

Path 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.


Type: Boolean

Default: true

Generate robots.txt from exclusions list.

Usage Examples


To simplify might do something like:

assemble: {
  blog: {
    options: {
      plugins: ['grunt-assemble-sitemap'],
    files: {
      './blog/': ['./templates/blog/*.hbs']




assemble: {
  blog: {
    options: {
      plugins: ['grunt-assemble-sitemap'],
      sitemap: {
        homepage: '',
            changefreq: 'daily',
            priority: '0.8',
            exclude: ['50x', 'foo'],
            robot: false
    files: {
      './blog/': ['./templates/blog/*.hbs']




We welcome all kinds of contributions! The most basic way to show your support is to star the project, and if you'd like to get involved please see the Contributing to grunt-assemble-sitemap guide for information on contributing to this project.

Other grunt-assemble plugins


Hariadi Hinta


Copyright © 2015 Hariadi Hinta Released under the MIT license.



  • 2015-09-25 v0.2.6 Rename to grunt-assemble-sitemap
  • 2014-06-01 v0.2.5 fix sitemap and robots not generated,relativedest can be a path now
  • 2014-06-01 v0.2.4 added sitemap URL to robots.txt,added relativedest to options
  • 2014-05-03 v0.2.3 fixes toc,Change docs to use verb
  • 2014-03-26 v0.2.2 Change from plugin to middleware
  • 2014-02-21 v0.2.1 fix option.robot was ignored and always true 0159123,(feat) add option.dest and use as output path,fix option.robot was ignored and always true,(feat) add option to overwrite changefreq per file,cosmetical changes (code formatting, naming, simplify),(wip) enable globbing patterns for option.exclude
  • 2014-02-05 v0.2.0 Generation of robots.txt will now respect the relativedest option.
  • 2014-02-02 v0.1.9 Fix sitemap destination
  • 2014-01-28 v0.1.8 Use external library,Get pages from assemble object
  • 2014-01-03 v0.1.7 Add relativedest option
  • 2013-12-12 v0.1.6 Fix plugin name in Usage Examples,Update deps
  • 2013-11-28 v0.1.4 Updates dependencies to work with Grunt 0.4.2,[object Object],Add TOC to docs
  • 2013-10-20 v0.1.3 Fix sitemap and robots.txt generated on every folder,Update docs options:exclusions
  • 2013-10-18 v0.1.2 Fix homepage
  • 2013-10-17 v0.1.1 Add option to generate robots.txt,Change name to assemble-contrib.sitemap,Move to Assemble main repo
  • 2013-10-01 v0.1.0 First commmit.,Add option to exclude

This file was generated by verb-cli on September 25, 2015.

Something went wrong with that request. Please try again.