boil-sitemap

0.1.2 • Public • Published

view on npm npm module downloads per month Dependency Status Analytics

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>

Readme

Keywords

none

Package Sidebar

Install

npm i boil-sitemap

Weekly Downloads

8

Version

0.1.2

License

none

Last publish

Collaborators

  • 75lb