diff --git a/src/components/global/Breadcrumb.astro b/src/components/global/Breadcrumb.astro index 48b1443..ea59782 100644 --- a/src/components/global/Breadcrumb.astro +++ b/src/components/global/Breadcrumb.astro @@ -2,7 +2,7 @@ interface Props { items: Array<{ text: string - href?: string + href?: string | undefined }> } --- diff --git a/src/content/config.ts b/src/content/config.ts index 5044874..0c7dfcc 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -11,7 +11,8 @@ const projectsCollection = defineCollection({ link: z.object({ href: z.string(), rel: z.string().optional(), - text: z.string().optional() + text: z.string().optional(), + target: z.string().optional() }).optional(), disabled: z.string().optional(), created: z.date().optional(), diff --git a/src/layouts/Article.astro b/src/layouts/Article.astro index ecf7787..be8630c 100644 --- a/src/layouts/Article.astro +++ b/src/layouts/Article.astro @@ -7,14 +7,14 @@ import Breadcrumb from 'components/global/Breadcrumb.astro' export interface Props extends BaseProps { link?: { href: string - rel?: string - text?: string - target?: string - } - disabled?: string + rel?: string | undefined + text?: string | undefined + target?: string | undefined + } | undefined + disabled?: string | undefined breadcrumb: Array<{ text: string - href?: string + href?: string | undefined }> } --- diff --git a/src/layouts/Head.astro b/src/layouts/Head.astro index 58718d0..8a5baa0 100644 --- a/src/layouts/Head.astro +++ b/src/layouts/Head.astro @@ -5,23 +5,23 @@ import IconPNG from '../assets/layouts/Base/favicon.png' import '@fontsource-variable/lexend' export interface Props { - siteName?: string - title?: string - description?: string - canonical?: string - image?: Array + siteName?: string | undefined + title?: string | undefined + description?: string | undefined + canonical?: string | undefined + image?: Array | undefined twitter?: { - title?: string - card?: "summary" | "summary_large_image" | "app" | "player" - site?: string - creator?: string - } + title?: string | undefined + card?: "summary" | "summary_large_image" | "app" | "player" | undefined + site?: string | undefined + creator?: string | undefined + } | undefined og?: { - title?: string - type?: string - description?: string - url?: string - } + title?: string | undefined + type?: string | undefined + description?: string | undefined + url?: string | undefined + } | undefined } const props = Astro.props diff --git a/src/pages/index.astro b/src/pages/index.astro index e054dc5..ed26321 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,6 +1,5 @@ --- import { getCollection } from 'astro:content' -import { Image } from 'astro:assets' import Layout from 'layouts/Layout.astro' import Picture from 'components/Picture.astro' diff --git a/src/pages/projets/[project].astro b/src/pages/projets/[project].astro index 0d83707..0473ea4 100644 --- a/src/pages/projets/[project].astro +++ b/src/pages/projets/[project].astro @@ -15,7 +15,17 @@ export async function getStaticPaths() { const { entry } = Astro.props as Awaited>[0]['props']; const { Content } = await entry.render(); --- -
+

{entry.data.title}

{entry.data.created && (