github delucis/astro-og-canvas astro-og-canvas@0.9.0

latest release: astro-og-canvas@0.10.0
8 days ago

Minor Changes

  • #117 b94a123 Thanks @delucis! - Adds type safety to OGImageRoute. The page parameter in getSlug() and getImageOptions() is now correctly inferred from the value passed to pages instead of being typed as any.

    OGImageRoute({
      pages: {
        example: {
          title: 'Example Page',
          description: 'Description of this page shown in smaller text',
        },
      },
      getImageOptions: (path, page) => {
        page;
        // ^? { title: string; description: string }
      },
    });

    ⚠️ Potentially breaking change: If you are type checking your code base, you may see type errors if you are accessing page in getSlug() or getImageOptions() in a non-type-safe way and will need to either update that code or add some additional types.

  • #117 b94a123 Thanks @delucis! - Exports OGImageOptions type

Don't miss a new astro-og-canvas release

NewReleases is sending notifications on new releases.