Skip to content
A simple sitemap.xml generator.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.editorconfig
.eslintignore
.eslintrc.json
.gitignore
.travis.yml
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

sitemaps

NPM Build Status

A simple sitemap.xml generator.

Install

$ npm i sitemaps --save

Usage

const sitemaps = require('sitemaps');

const highPriority = [
    'https://example.com',
];
const lowPriority = [
    'https://example.com/about',
    'https://example.com/services',
    'https://example.com/contact',
];
const filePath = `${__dirname}/sitemap.xml`;

sitemaps(highPriority, lowPriority, filePath, (xml, error) => {
    if (error) {
        console.log(error);
        return;
    }
    console.log(`Sitemap.xml generated at: ${filePath}`);
});

License

Open source under the terms of the MIT License.

You can’t perform that action at this time.