Skip to content

feeds.ts#

View Markdown

Source

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

6 symbols 3 functions 2 interfaces 1 modules 4 parameters 13 members 3 returns

Reference#

modulefeedsOpt-in RSS / Atom / JSON Feed helpers. Bodies come from oxcontentssg::generate_feeds through the NAPI binding. What s…

Opt-in RSS / Atom / JSON Feed helpers.

Bodies come from ox_content_ssg::generate_feeds through the NAPI binding. What stays here is the part that binding does not model: which entries a channel publishes, where each file lands, and writing them.

View source

interfaceFeedsRenderInputInputs for rendering feed bodies.

Inputs for rendering feed bodies.

Signature

export interface FeedsRenderInput

View source

Members

Properties
NameTypeDescription
baseoptional string
collectionNamesoptional readonly string[]
collectionsoptional Record<string, readonly FeedItemInput[]>
itemsoptional readonly FeedItemInput[]
optionsoptional ResolvedFeedsOptions | null
publishStateoptional ResolvedPublishStateOptions
siteDescriptionoptional string
siteNameoptional string
siteUrloptional string
interfaceFeedsRenderResultRendered feed bodies, or a skip warning.

Rendered feed bodies, or a skip warning.

Signature

export interface FeedsRenderResult

View source

Members

Properties
NameTypeDescription
atomXmloptional string
jsonFeedoptional string
rssXmloptional string
warningoptional string
fngenerateFeeds(input: FeedsRenderInput): FeedsRenderResultBuilds RSS / Atom / JSON Feed bodies without writing files.

Builds RSS / Atom / JSON Feed bodies without writing files.

Signature

export function generateFeeds(input: FeedsRenderInput): FeedsRenderResult

View source

Parameters

Returns

FeedsRenderResult
fnresolveFeedCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefinedPicks content, else the first configured collection name.

Picks content, else the first configured collection name.

Signature

export function resolveFeedCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefined

View source

Parameters

  • requested string | undefined
  • collectionNames readonly string[]

Returns

string | undefined
fnresolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptionsResolves feeds with defaults. false / omitted stays off. true enables all three…

Resolves feeds with defaults.

false / omitted stays off. true enables all three formats with collection content (or the first configured collection) and limit 20. A single object is one default feed. A named record or array writes multiple feeds.

Signature

export function resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptions

View source

Parameters

Returns

ResolvedFeedsOptions