Feed Getter
You can take full control of feed items generation by setting getter
in the plugin options.
getter.title
- Type:
(page: Page, app: App) => string
Item title getter
getter.link
- Type:
(page: Page, app: App) => string
Item link getter
getter.description
- Type:
(page: Page, app: App) => string | undefined
Item description getter
Tips
Due to Atom support HTML in summary, so you can return HTML content here if possible, but the content must start with mark html:
.
getter.content
- Type:
(page: Page, app: App) => string
Item content getter
getter.author
- Type:
(page: Page, app: App) => FeedAuthor[]
Item author getter.
The getter should return an empty array when author information is missing.
FeedAuthor format
interface FeedAuthor {
/**
* Author name
*/
name?: string
/**
* Author email
*/
email?: string
/**
* Author site
*
* @description json format only
*/
url?: string
/**
* Author avatar
*
* @description json format only
*/
avatar?: string
}
getter.category
- Type:
(page: Page, app: App) => FeedCategory[] | undefined
Item category getter.
FeedCategory format
interface FeedCategory {
/**
* Category Name
*/
name: string
/**
* A string that identifies a categorization taxonomy
*
* @description rss format only
*/
domain?: string
/**
* the categorization scheme via a URI
*
* @description atom format only
*/
scheme?: string
}
getter.enclosure
- Type:
(page: Page, app: App) => FeedEnclosure | undefined
Item enclosure getter.
FeedEnclosure format
interface FeedEnclosure {
/**
* Enclosure link
*/
url: string
/**
* what its type is
*
* @description should be a standard MIME Type, rss format only
*/
Type: string
/**
* Size in bytes
*
* @description rss format only
*/
length?: number
}
getter.publishDate
- Type:
(page: Page, app: App) => Date | undefined
Item release date getter
getter.lastUpdateDate
- Type:
(page: Page, app: App) => Date
Item last update date getter
getter.image
- Type:
(page: Page, app: App) => string
Item Image Getter
Ensure it's returning a full URL
getter.contributor
- Type:
(page: Page, app: App) => FeedContributor[]
Item Contributor Getter
The getter should return an empty array when contributor information is missing.
FeedContributor format
interface FeedContributor {
/**
* Author name
*/
name?: string
/**
* Author email
*/
email?: string
/**
* Author site
*
* @description json format only
*/
url?: string
/**
* Author avatar
*
* @description json format only
*/
avatar?: string
}
getter.copyright
- Type:
(page: Page, app: App) => string | undefined
Item copyright getter