Skip to content

BlackGlory/extra-sitemap

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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>