$ npm install assemble-middleware-sitemap

Sitemap middleware for Assemble
Install with npm:
npm i assemble-middleware-sitemap --save-dev
Next, register the middleware with Assemble:
assemble: {
options: {
middleware: ['assemble-middleware-sitemap', 'other/middleware/*']
}
}
Visit the middleware docs for more info or for help getting started.
See sitemaps.org 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:
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.
To simplify might do something like:
assemble: {
blog: {
options: {
plugins: ['assemble-middleware-sitemap'],
},
files: {
'./blog/': ['./templates/blog/*.hbs']
}
}
}
./blog/sitemap.xml
./blog/robots.txt
assemble: {
blog: {
options: {
plugins: ['assemble-middleware-sitemap'],
sitemap: {
homepage: 'http://assemble.io',
changefreq: 'daily',
priority: '0.8',
exclude: ['50x', 'foo'],
robot: false
}
},
files: {
'./blog/': ['./templates/blog/*.hbs']
}
}
}
./blog/sitemap.xml
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 assemble-middleware-sitemap guide for information on contributing to this project.
DATE VERSION CHANGES
Hariadi Hinta
Copyright (c) 2014 Hariadi Hinta, contributors.
Released under the MIT license
Here are some related projects you might be interested in from the Assemble core team.
Visit assemble.io/assemble-middleware for more information about Assemble middleware.
This file was generated by grunt-verb on June 03, 2014.