diff --git a/src/components/seo/SEOTags.astro b/src/components/seo/SEOTags.astro index c86eda4..3288aae 100644 --- a/src/components/seo/SEOTags.astro +++ b/src/components/seo/SEOTags.astro @@ -1,19 +1,9 @@ --- import { SEO } from "astro-seo"; import { SITE_URL } from "@/data/config"; +import type { HeadTags } from "@/utils/types/HeadTags"; -type Props = { - title?: string; - description?: string; - noindex?: boolean; - og?: { - title: string; - type: string; - description: string; - image: string; - alt: string; - }; -}; +type Props = HeadTags; const { title, description, noindex, og } = Astro.props; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 4a7b7e5..494b16f 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -3,21 +3,20 @@ import Header from "../components/Header.astro"; import BlurCircle from "@/components/shared/BlurCircle.astro"; import theme from "@/data/theme"; import SEOTags from "@/components/seo/SEOTags.astro"; +import type { HeadTags } from "@/utils/types/HeadTags"; import "@fontsource/open-sans"; import "@/styles/tailwind.css"; import "@/styles/post.css"; -export interface Props { - title?: string; -} +export type Props = HeadTags; -const { title } = Astro.props; +const headTags = Astro.props; --- - + +

diff --git a/src/utils/types/HeadTags.ts b/src/utils/types/HeadTags.ts new file mode 100644 index 0000000..abbf3d4 --- /dev/null +++ b/src/utils/types/HeadTags.ts @@ -0,0 +1,12 @@ +export type HeadTags = { + title?: string; + description?: string; + noindex?: boolean; + og?: { + title: string; + type: string; + description: string; + image: string; + alt: string; + }; +};