Skip to content

site-maps.ts#

View Markdown

Source

9 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

9 symbols 4 functions 4 interfaces 1 modules 4 parameters 23 members 4 returns

Reference#

fnformatLastmod(timestampMs: number | undefined): string | undefinedUTC YYYY-MM-DD for W3C lastmod. Invalid or negative timestamps are dropped.

UTC YYYY-MM-DD for W3C lastmod. Invalid or negative timestamps are dropped.

Signature

export function formatLastmod(timestampMs: number | undefined): string | undefined

View source

Parameters

  • timestampMs number | undefined

Returns

string | undefined
fngenerateSiteMaps(input: SiteMapsRenderInput): SiteMapsRenderResultBuilds sitemap / robots / llms bodies without writing files.

Builds sitemap / robots / llms bodies without writing files.

Signature

export function generateSiteMaps(input: SiteMapsRenderInput): SiteMapsRenderResult

View source

Parameters

Returns

SiteMapsRenderResult
fnresolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptionsResolves siteMaps with defaults. false / omitted stays off. true enables all th…

Resolves siteMaps with defaults.

false / omitted stays off. true enables all three files. An object enables the feature and overrides only the fields the site set.

Signature

export function resolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptions

View source

Parameters

Returns

ResolvedSiteMapsOptions
modulesite-mapsOpt-in sitemap.xml / robots.txt / llms.txt helpers. Bodies come from oxcontentssg::generatesitemaps through the NAP…

Opt-in sitemap.xml / robots.txt / llms.txt helpers.

Bodies come from ox_content_ssg::generate_site_maps through the NAPI binding. What stays here is what that binding does not model: validating siteUrl, deriving the sitemap location, and writing the files.

View source

interfaceSiteMapPageInputOne page considered for crawl manifests.

One page considered for crawl manifests.

Signature

export interface SiteMapPageInput

View source

Members

Properties
NameTypeDescription
descriptionoptional string
draftoptional boolean
lastUpdatedoptional number
Source-file git commit time in milliseconds. Omitted when Git has no history.
loc string
title string
unlistedoptional boolean
interfaceSiteMapsRenderInputInputs for rendering crawl-manifest bodies.

Inputs for rendering crawl-manifest bodies.

Signature

export interface SiteMapsRenderInput

View source

Members

Properties
NameTypeDescription
optionsoptional ResolvedSiteMapsOptions | null
pages readonly SiteMapPageInput[]
siteDescriptionoptional string
sitemapLocoptional string
siteNameoptional string
siteUrloptional string
interfaceSiteMapsRenderResultRendered crawl-manifest bodies, or a skip warning.

Rendered crawl-manifest bodies, or a skip warning.

Signature

export interface SiteMapsRenderResult

View source

Members

Properties
NameTypeDescription
llmsTxtoptional string
robotsTxtoptional string
sitemapXmloptional string
warningoptional string
fnwriteSiteMapFiles(input: WriteSiteMapFilesInput): Promise<{ files: string[]; warning?: string }>Writes enabled crawl manifests into outDir.

Writes enabled crawl manifests into outDir.

Signature

export async function writeSiteMapFiles(input: WriteSiteMapFilesInput): Promise<{ files: string[]; warning?: string }>

View source

Parameters

Returns

Promise<{ files: string[]; warning?: string }>
interfaceWriteSiteMapFilesInputInputs for writing crawl manifests next to generated HTML.

Inputs for writing crawl manifests next to generated HTML.

Signature

export interface WriteSiteMapFilesInput

View source

Members

Properties
NameTypeDescription
base string
optionsoptional ResolvedSiteMapsOptions
outDir string
pages readonly SiteMapPageInput[]
siteDescriptionoptional string
siteNameoptional string
siteUrloptional string