Add basic seo metatags (need improvement)
This commit is contained in:
@ -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;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
@ -13,8 +26,28 @@ const { title = "", description = "", withHeader = true } = Astro.props;
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
|
||||
<!-- Google / Search Engine Tags -->
|
||||
<meta itemprop="name" content={title} />
|
||||
<meta itemprop="description" content={description} />
|
||||
<meta itemprop="image" content={image} />
|
||||
|
||||
<!-- Facebook Meta Tags -->
|
||||
<meta property="og:url" content="https://astrowind.vercel.app" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={image} />
|
||||
|
||||
<!-- Twitter Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={image} />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap" rel="stylesheet"
|
||||
|
@ -14,7 +14,7 @@ import BlogFeaturesFourCols from "~/components/astro/blog/BlogFeaturesFourCols.a
|
||||
|
||||
<Layout
|
||||
title="AstroWind — Your website with Astro + Tailwind CSS"
|
||||
description="Performance and accessible template to make your website using Astro + Tailwind CSS."
|
||||
description="A template to make your website using Astro + Tailwind CSS."
|
||||
>
|
||||
<main class="mt-20">
|
||||
<HeroWithImage />
|
||||
|
Reference in New Issue
Block a user