Skip to content

Commit

Permalink
feat: added canonical url
Browse files Browse the repository at this point in the history
  • Loading branch information
GioPan04 committed Mar 24, 2024
1 parent 8a28524 commit 3063020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ interface Props {
}
const { title } = Astro.props;
const url = Astro.url;
---

<!doctype html>
Expand All @@ -22,6 +23,7 @@ const { title } = Astro.props;
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:[email protected]&family=Press+Start+2P&display=swap" rel="stylesheet">
<title>{title} - giopan.dev</title>
<link rel="canonical" href={url} />
</head>
<body class="antialiased bg-primary font-base text-white pt-12">
<NavBar />
Expand Down
1 change: 1 addition & 0 deletions src/layouts/Post.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const url = Astro.url;
<meta property="article:modified_time" content={ frontmatter.pubDate } />
<meta name="twitter:creator" content="@giopan_sh" />
<meta name="twitter:card" content="summary" />
<link rel="canonical" href={url} />
</head>
<body class="antialiased bg-primary font-base text-white pt-12">
<NavBar />
Expand Down

0 comments on commit 3063020

Please sign in to comment.