extra-sitemap
Install
npm install --save extra-sitemap
# or
yarn add extra-sitemap
API
enum ChangeFrequency {
Always
, Hourly
, Daily
, Weekly
, Monthly
, Yearly
, Never
}
interface IURLItem {
url: string
lastModdified?: Date
priority?: 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0
changeFrequency?: ChangeFrequency
}
interface ISitemapItem {
url: string
lastModified?: Date
}
createSitemap
function createSitemap(urlItems: Iterable<IURLItem>): Iterable<string>
createSitemapAsync
function createSitemapAsync(urlItems: AsyncIterable<IURLItem>): AsyncIterable<string>
createSitemapIndex
function createSitemapIndex(sitemapItems: Iterable<ISitemapItem>): Iterable<string>
createSitemapIndexAsync
function createSitemapIndexAsync(
sitemapItems: AsyncIterable<ISitemapItem>
): AsyncIterable<string>