Import the SEO component and place it inside the <head> section of your Astro page or layout. You can configure various SEO properties including title, description, Open Graph, Twitter, and custom extensions.
---
import { SEO } from "astro-seo";
---
<html lang="en">
<head>
<SEO
title="A Very Descriptive Title"
description="A heavily optimized description full of well-researched keywords."
openGraph={{
basic: {
title: "A Very Descriptive Title",
type: "A type.",
image: "https://user-images.githubusercontent.com/5182256/131216951-8f74f425-f775-463d-a11b-0e01ad9fce8d.png",
}
}}
twitter={{
creator: "@jonasmerlins1"
}}
extend={{
// extending the default link tags
link: [{ rel: "icon", href: "/favicon.ico" }],
// extending the default meta tags
meta: [
{
name: "twitter:image",
content: "https://user-images.githubusercontent.com/5182256/131216951-8f74f425-f775-463d-a11b-0e01ad9fce8d.png",
},
{ name: "twitter:title", content: "Tinker Tailor Soldier Spy" },
{ name: "twitter:description", content: "Agent" },
],
}}
/>
// ... rest of <head>
</head>
<body> // ... body </body>
</html>