diff --git a/src/components/astro/utils/BasicScripts.astro b/src/components/astro/utils/BasicScripts.astro new file mode 100644 index 0000000..aa33a9d --- /dev/null +++ b/src/components/astro/utils/BasicScripts.astro @@ -0,0 +1,25 @@ +--- +const {} = Astro.props; +--- + + diff --git a/src/components/astro/utils/MetaTags.astro b/src/components/astro/utils/MetaTags.astro new file mode 100644 index 0000000..385e4b4 --- /dev/null +++ b/src/components/astro/utils/MetaTags.astro @@ -0,0 +1,53 @@ +--- +import { getImage } from "@astrojs/image"; + +const { src: defaultImage } = await getImage({ + src: import("~/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, +} = Astro.props; + +const canonicalURL = new URL(Astro.url.pathname, Astro.site); +const absoluteImageUrl = new URL(image, Astro.site); +--- + + + + + +{title} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index b905a74..faf9dc9 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -3,56 +3,16 @@ import "~/assets/styles/base.css"; import Header from "~/components/astro/headers/BasicHeader.astro"; import Footer from "~/components/astro/footers/BasicFooter.astro"; +import MetaTags from "~/components/astro/utils/MetaTags.astro"; +import BasicScripts from "~/components/astro/utils/BasicScripts.astro"; -import { getImage } from "@astrojs/image"; - -const { src: defaultImage } = await getImage({ - src: import("~/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; +const { title, description, image } = Astro.props; --- - - - - - {title} - - - - - - - - - - - - - - - - - - - - - - - - +