Saltar al contenido principal

Interface: IRssService

Defined in: src/types/index.ts:655

Contract of the RSS facade.

Methods

useCreateRssEndpoint()

useCreateRssEndpoint(config): (context) => Promise<Response>

Defined in: src/types/index.ts:661

Generates an Astro GET endpoint handler for the RSS feed.

Parameters

config

Omit<RssConfig, "items"> & object

Returns

(context) => Promise<Response>


useCreateRssEndpointFromConfig()

useCreateRssEndpointFromConfig(siteConfig, items): (context) => Promise<Response>

Defined in: src/types/index.ts:665

Convenience: creates an RSS endpoint from a SiteConfig.

Parameters

siteConfig

SiteConfig

items

RssItem[] | (() => RssItem[] | Promise<RssItem[]>)

Returns

(context) => Promise<Response>


useGenerateRss()

useGenerateRss(config): RssResult

Defined in: src/types/index.ts:657

Generates the RSS XML string from a config.

Parameters

config

RssConfig

Returns

RssResult


useRssLinkTag()

useRssLinkTag(config): string

Defined in: src/types/index.ts:659

Generates an HTML <link> tag for the RSS feed.

Parameters

config

Pick<RssConfig, "title" | "xmlPath">

Returns

string