Skip to content
Branch: master
Find file History
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.
examples
src
test
.gitignore
.npmignore
package.json
readme.md

readme.md

@sphido/sitemap

Install

yarn add @sphido/sitemap

Example

const {outputFile} = require('fs-extra');
const sitemap = require('@sphido/sitemap');

const posts = [
	{link: 'https://example.com/first', date: new Date()},
	{link: 'https://example.com/second', date: new Date()},
];

(async () => {
	await outputFile(
		__dirname  + '/sitemap.xml',
		sitemap(posts, 'https://example.com')
	);
})();
You can’t perform that action at this time.