Skip to content

permalinks.ts#

View Markdown

Source

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

8 symbols 4 functions 3 interfaces 1 modules 7 parameters 8 members 4 returns

Reference#

fnescapeAttribute(value: string): stringEscapes a value for use in an HTML attribute.

Escapes a value for use in an HTML attribute.

Signature

export function escapeAttribute(value: string): string

View source

Parameters

  • value string

Returns

string
modulepermalinksOpt-in permalink / slug routing and index frontmatter cascade. Resolution follows oxcontentssg::resolvepage_routes.…

Opt-in permalink / slug routing and _index frontmatter cascade.

Resolution follows ox_content_ssg::resolve_page_routes. The Vite plugin applies those URLs during SSG and collection manifest builds.

View source

fnresolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptionsResolves cascade. false / omitted stays off. true / {} enables.

Resolves cascade. false / omitted stays off. true / {} enables.

Signature

export function resolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptions

View source

Parameters

Returns

ResolvedCascadeOptions
interfaceResolvedRoutePageA page after cascade and optional permalink / slug rewriting.

A page after cascade and optional permalink / slug rewriting.

Signature

export interface ResolvedRoutePage

View source

Members

Properties
NameTypeDescription
frontmatter Record<string, unknown>
source string
urlPath string
fnresolvePageRoutes(input: { pages: readonly RoutePageInput[]; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; }): RouteResolveOutputApplies cascade (when on) then permalink / slug rewriting (when on). Collisions…

Applies cascade (when on) then permalink / slug rewriting (when on).

Collisions skip the later page and keep the first. Rejected permalinks stay on the file-tree URL. Hostile non-string values are ignored.

Signature

export function resolvePageRoutes(input: {
  pages: readonly RoutePageInput[];
  permalinks?: ResolvedPermalinksOptions | null;
  cascade?: ResolvedCascadeOptions | null;
}): RouteResolveOutput

View source

Parameters

Returns

RouteResolveOutput
fnresolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptionsResolves permalinks. false / omitted stays off. true / {} enables.

Resolves permalinks. false / omitted stays off. true / {} enables.

Signature

export function resolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptions

View source

Parameters

Returns

ResolvedPermalinksOptions
interfaceRoutePageInputOne page considered for cascade and permalink resolution.

One page considered for cascade and permalink resolution.

Signature

export interface RoutePageInput

View source

Members

Properties
NameTypeDescription
fileUrl string
frontmatter Record<string, unknown>
source string
interfaceRouteResolveOutputResolved pages plus collision / rejection errors.

Resolved pages plus collision / rejection errors.

Signature

export interface RouteResolveOutput

View source

Members

Properties
NameTypeDescription
errors string[]
pages ResolvedRoutePage[]