0.1.2 • Published 9 years ago
boil-sitemap v0.1.2
boil-sitemap
Command-line tool to generate a sitemap.xml from static files.
Install
$ npm install -g boil-sitemap
Usage
The files
argument accepts globstar-style **
patterns. The default changefreq
is daily
.
$ sitemap --prefix <url-prefix> [--changefreq <freq>] <files>
Example
The command:
$ sitemap --prefix http://example.com/ --changefreq daily mysite/**/*.html
Outputs something like:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://example.com/2014/02/02/some-article.html</loc>
<lastmod>2014-05-22T08:49:38.000Z</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://example.com/2014/02/08/another-article.html</loc>
<lastmod>2014-05-22T08:49:38.000Z</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://example.com/index.html</loc>
<lastmod>2014-05-22T08:49:38.000Z</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>