site-maps.ts#
9 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
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 | undefinedParameters
-
timestampMsnumber | 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): SiteMapsRenderResultParameters
-
inputSiteMapsRenderInput
Returns
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): ResolvedSiteMapsOptionsParameters
-
valueboolean | SiteMapsOptions | undefined
Returns
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.
interfaceSiteMapPageInputOne page considered for crawl manifests.
One page considered for crawl manifests.
Signature
export interface SiteMapPageInputMembers
Properties
| Name | Type | Description |
|---|---|---|
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 SiteMapsRenderInputMembers
Properties
| Name | Type | Description |
|---|---|---|
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 SiteMapsRenderResultMembers
Properties
| Name | Type | Description |
|---|---|---|
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 }>Parameters
-
inputWriteSiteMapFilesInput
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 WriteSiteMapFilesInputMembers
Properties
| Name | Type | Description |
|---|---|---|
base |
string |
|
optionsoptional |
ResolvedSiteMapsOptions |
|
outDir |
string |
|
pages |
readonly SiteMapPageInput[] |
|
siteDescriptionoptional |
string |
|
siteNameoptional |
string |
|
siteUrloptional |
string |