Feed Getter

Mr.Hope ... 2022-5-15 About 1 min

You can take full control of feed items generation by setting getter in the plugin options.

# getter.title

  • Type: (page: Page) => string

Item title getter

  • Type: (page: Page) => string

Item link getter

# getter.description

  • Type: (page: Page) => string | undefined

Item description getter

Note

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) => string

Item content getter

# getter.author

  • Type: (page: Page) => FeedAuthor[]

Item author getter.

Note

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;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# getter.category

  • Type: (page: Page) => 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;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# getter.enclosure

  • Type: (page: Page) => 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;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# getter.publishDate

  • Type: (page: Page) => Date | undefined

Item release date getter

# getter.lastUpdateDate

  • Type: (page: Page) => Date

Item last update date getter

# getter.image

  • Type: (page: Page) => string

Item Image Getter

Note

Make sure you are returning a full URL.

# getter.contributor

  • Type: (page: Page) => FeedContributor[]

Item Contributor Getter

Note

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;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  • Type: (page: Page) => string | undefined

Item copyright getter

Last update: May 15, 2022 08:13
Contributors: Mr.Hope