Skip to content

Commit 7bfb9a8

Browse files
committed
feat: add description meta tag
1 parent e54ab43 commit 7bfb9a8

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/layouts/Layout.astro

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
interface Props {
33
title: string;
4+
description: string;
45
}
56
6-
const { title } = Astro.props;
7+
const { title, description } = Astro.props;
78
---
89

910
<!doctype html>
1011
<html lang="en">
1112
<head>
1213
<meta charset="UTF-8" />
13-
<meta name="description" content="Astro description" />
14+
<meta name="description" content={description} />
1415
<meta name="viewport" content="width=device-width" />
1516
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
1617
<meta name="generator" content={Astro.generator} />

src/pages/index.astro

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import Experience from "../components/Experience.astro";
44
import SocialMedia from "../components/SocialMedia.astro";
55
import { Icon } from "astro-icon";
66
7+
const metadata = {
8+
title: "Lucas Machado",
9+
description:
10+
"Lucas Machado is a software engineer who builds accessible and interactive user experiences for the web.",
11+
};
12+
713
const socialMedia = [
814
{
915
label: "GitHub",
@@ -23,7 +29,7 @@ const socialMedia = [
2329
];
2430
---
2531

26-
<Layout title="Lucas Machado">
32+
<Layout {...metadata}>
2733
<div
2834
class="mx-auto min-h-screen max-w-screen-xl px-6 py-12 md:px-12 md:py-20 lg:px-24 lg:py-0 lg:flex lg:justify-between lg:gap-4"
2935
>

0 commit comments

Comments
 (0)