coldbydefault-portfolio
    Preparing search index...

    Variable getBlogBySlugConst

    getBlogBySlug: (slug: string) => Promise<Blog | null> = ...

    Get a single blog by slug (per-request deduplicated)

    Type Declaration

      • (slug: string): Promise<Blog | null>
      • Get a single blog by slug and count the read.

        Wrapped in cache() below so a page render that resolves the blog in both generateMetadata and the page body counts a single view, not two.

        Parameters

        • slug: string

        Returns Promise<Blog | null>