From ac4650180495d3bf20064094810cdc2d7e2b3b8f Mon Sep 17 00:00:00 2001 From: prototypa Date: Sat, 13 Aug 2022 14:33:27 -0400 Subject: [PATCH] Add basic seo metatags (need improvement) --- src/layouts/Default.astro | 35 ++++++++++++++++++++++++++++++++++- src/pages/index.astro | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index 9bd6d1c..7a701e8 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -4,7 +4,20 @@ import "~/assets/styles/base.css"; import Header from "~/components/astro/headers/BasicHeader.astro"; import Footer from "~/components/astro/footers/BasicFooter.astro"; -const { title = "", description = "", withHeader = true } = Astro.props; +import { getImage } from "@astrojs/image"; + +const { src: defaultImage } = await getImage({ + src: "~/assets/images/hero.jpg", + width: 768, + aspectRatio: "16:9" +}) + +const { + title = "AstroWind", + description = "A template to make your website using Astro + Tailwind CSS.", + image = defaultImage, + withHeader = true, +} = Astro.props; --- @@ -13,8 +26,28 @@ const { title = "", description = "", withHeader = true } = Astro.props; + {title} + + + + + + + + + + + + + + + + + + +