From d54fc38899b3ffc87104ed03f5e48be3f02e337c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 7 Jun 2022 15:59:48 +0200 Subject: chore: use image title as figure label if no caption is provided --- src/ts/types/mdx.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ts') diff --git a/src/ts/types/mdx.ts b/src/ts/types/mdx.ts index 16538c1..7645ce6 100644 --- a/src/ts/types/mdx.ts +++ b/src/ts/types/mdx.ts @@ -3,7 +3,12 @@ import { Meta } from './app'; export type MDXData = { file: string; - image: StaticImageData; + image: MDXImage; +}; + +export type MDXImage = StaticImageData & { + alt: string; + title?: string; }; export type MDXPageMeta = Pick, 'cover' | 'dates' | 'seo'> & { -- cgit v1.2.3