Aller au contenu
⌘K

PublicationIndexModule

Voir en Markdown
Sur cette page
Cette référence API est générée à partir des commentaires TypeScript en anglais. Les noms, signatures et exemples correspondent au paquet publié.

Exports of publication.components.index.

import type { PublicationIndexModule } from "ardo/ui"

type PublicationIndexModule = {
    default: ComponentType<PublicationIndexProps>;
    meta?: (args: PublicationIndexMetaArgs) => ArdoMetaDescriptor[];
    /**
     * Page data that the root reads with `useArdoPage().frontmatter`, as it reads a post's
     * frontmatter. Ardo calls it when it renders the route, on the server and when the page
     * hydrates, like `meta`. Without it, the page has no frontmatter.
     */
    frontmatter?: (args: PublicationIndexFrontmatterArgs) => Record<string, unknown>;
};

Properties

NameTypeRequiredDescription
defaultComponentType<PublicationIndexProps>Yes
meta(args: PublicationIndexMetaArgs) => ArdoMetaDescriptor[]No
frontmatter(args: PublicationIndexFrontmatterArgs) => Record<string, unknown>NoPage data that the root reads with useArdoPage().frontmatter, as it reads a post's
frontmatter. Ardo calls it when it renders the route, on the server and when the page
hydrates, like meta. Without it, the page has no frontmatter.