Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SitemapGenerator

Generates a rudimental sitemap of the website. At the moment mostly used YASSB itself for resolving url-to values to create links to other pages.

Hierarchy

  • SitemapGenerator

Index

Constructors

constructor

Properties

Private config

config: YassbConfig

Private files

files: Array<string> = []

Private sitemap

sitemap: any = new XmlSitemap()

Static fakeHost

fakeHost: string = "http://fake.host/"

Fake host of sitemap generator, used unless a custom value is provided in the configuration. During post processing, if the host is the defaul one (fake.host), the sitemap is deleted.

Methods

Private elaborateList

  • elaborateList(): void

make

  • make(): void

Private processAndAddFile

  • processAndAddFile(pathToFile: string): void
  • Elaborates the relative url of the file from the our dir and adds it to the sitemap.

    Parameters

    • pathToFile: string

      the full path to the file on disk.

    Returns void

Private saveToDisk

  • saveToDisk(): void

Private setFileList

  • setFileList(): void

Private setHost

  • setHost(): void