@rogerpence/rp-utils
    Preparing search index...

    Type Alias IndexObject<T>

    IndexObject: T & {
        content: string;
        folder: string;
        locale: string;
        slug: string;
    }

    Represents a complete index object that extends frontmatter with additional metadata.

    This type uses TypeScript's intersection (&) to combine all properties from the generic frontmatter type T with index-specific properties.

    Type Parameters

    • T

      The frontmatter type

    This type includes all properties from T plus four additional properties:

    • content: The full markdown content
    • locale: Language/region identifier
    • slug: URL-friendly identifier
    • folder: Directory path

    For a version without the content property, see NavigationObject.

    Creating an IndexObject with TechnicalNoteFrontmatter

    const indexObj: IndexObject<TechnicalNoteFrontmatter> = {
    All TechnicalNoteFrontmatter properties:
    title: 'My Post',
    description: 'A description',
    date_created: '2025-01-01',
    date_updated: '2025-01-02',
    date_published: null,
    pinned: false,
    tags: ['javascript'],
    Plus IndexObject-specific properties:
    content: '# Markdown content here',
    locale: 'en',
    slug: '/technical-posts/my-post',
    folder: 'technical-posts'
    };