chore: set up SEO meta description (#1)

This commit is contained in:
Ayo 2022-10-13 08:14:05 +02:00
parent 283b4557ed
commit 9e0009a6d8
2 changed files with 25 additions and 8 deletions

22
src/components/Head.astro Normal file
View file

@ -0,0 +1,22 @@
---
export interface Props {
title: string;
}
const { title } = Astro.props;
const description =
"Ayo Ayco is a software engineer and consultant for hire, expecializing in web development | " +
title;
---
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="theme-color" content="#3054bf" />
<!-- SEO -->
<meta name="description" content={description} />
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<title>{title}</title>
</head>

View file

@ -1,4 +1,5 @@
---
import Head from "../components/Head.astro";
export interface Props {
title: string;
}
@ -8,14 +9,8 @@ const { title } = Astro.props;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="theme-color" content="#3054bf" />
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<title>{title}</title>
</head>
<Head title={title} />
<body>
<slot />