Sitemap
module Sitemap| Assembly | Nacara.Plugin.Sitemap |
| Attributes | [<RequireQualifiedAccess>] |
A sitemap of the built site, and optionally a robots.txt pointing at it.
Only pages that exist in this build are listed, and only when the site declares where it is published. Translations are cross-referenced with hreflang, so a search engine can offer a reader the language they asked for.
Functions and values
create () : IPlugin
create () : IPluginA sitemap, with the default options.
createWith (configure: SitemapOptions -> SitemapOptions) : IPlugin
createWith (configure: SitemapOptions -> SitemapOptions) : IPluginA sitemap, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
defaults: SitemapOptionsexcludeCollections (value: string list) (options: SitemapOptions) : SitemapOptions
excludeCollections (value: string list) (options: SitemapOptions) : SitemapOptionsPages to leave out, by collection name.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
path (value: string) (options: SitemapOptions) : SitemapOptions
path (value: string) (options: SitemapOptions) : SitemapOptionsWhere the sitemap is written, relative to the output directory.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
registerWith (configure: SitemapOptions -> SitemapOptions) (site: Site) : Site
registerWith (configure: SitemapOptions -> SitemapOptions) (site: Site) : SiteAdd a sitemap to a site, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
site | The site being described. |
render (site: SiteInfo) (options: SitemapOptions) (pages: Page list) : string
render (site: SiteInfo) (options: SitemapOptions) (pages: Page list) : stringRender the sitemap for a set of pages.
| Parameter | |
|---|---|
site | Where the site is published, for the absolute urls a sitemap needs. |
options | What to leave out, and where the file goes. |
pages | Every page the build produced. |
writeRobots (value: bool) (options: SitemapOptions) : SitemapOptions
writeRobots (value: bool) (options: SitemapOptions) : SitemapOptionsAlso write a robots.txt pointing at the sitemap.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |