interface Options {
    allowEmptyContent?: boolean;
    allowEmptyMetadata?: boolean;
    allowOnlyMedia?: boolean;
    grayMatterOptions?: {
        delimiters?: string | [string, string];
        engines?: {
            [index: string]: ((input) => object) | {
                parse: ((input) => object);
                stringify?: ((data) => string);
            };
        };
        excerpt?: boolean | ((input, output) => string);
        excerpt_separator?: string;
        language?: string;
    };
    limit?: number;
    optUserOutFromPosts?: string[];
    pinnedOnly?: boolean;
    slackParserOptions?: SlackMarkdownOptions;
}

Properties

allowEmptyContent?: boolean

If true, posts with empty content will be included in the array

allowEmptyMetadata?: boolean

If true, posts with empty metadata will be included in the array

allowOnlyMedia?: boolean

If true, only posts with media will be included in the array

grayMatterOptions?: {
    delimiters?: string | [string, string];
    engines?: {
        [index: string]: ((input) => object) | {
            parse: ((input) => object);
            stringify?: ((data) => string);
        };
    };
    excerpt?: boolean | ((input, output) => string);
    excerpt_separator?: string;
    language?: string;
}

Type declaration

  • Optional delimiters?: string | [string, string]
  • Optional engines?: {
        [index: string]: ((input) => object) | {
            parse: ((input) => object);
            stringify?: ((data) => string);
        };
    }
    • [index: string]: ((input) => object) | {
          parse: ((input) => object);
          stringify?: ((data) => string);
      }
  • Optional excerpt?: boolean | ((input, output) => string)
  • Optional excerpt_separator?: string
  • Optional language?: string
limit?: number

The maximum number of posts to return

optUserOutFromPosts?: string[]

A list of uesrs to exclude from the posts

pinnedOnly?: boolean

If true, only pinned posts will be included in the array

slackParserOptions?: SlackMarkdownOptions

Options to pass to slack-markdown https://www.npmjs.com/package/slack-markdown#options