feeds.ts#
6 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
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.
interfaceFeedsRenderInputInputs for rendering feed bodies.
Inputs for rendering feed bodies.
Signature
export interface FeedsRenderInputMembers
Properties
| Name | Type | Description |
|---|---|---|
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 FeedsRenderResultMembers
Properties
| Name | Type | Description |
|---|---|---|
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): FeedsRenderResultParameters
-
inputFeedsRenderInput
Returns
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 | undefinedParameters
-
requestedstring | undefined -
collectionNamesreadonly 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): ResolvedFeedsOptionsParameters
-
valueboolean | FeedsOptions | undefined