Skip to content

Commit

Permalink
refactor: add description to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Oct 28, 2024
1 parent 96f798a commit be77c5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
type Props = {
title?: string;
description?: string;
};
const { title } = Astro.props;
const { title, description } = Astro.props;
---

<!doctype html>
Expand All @@ -12,7 +13,8 @@ const { title } = Astro.props;
<meta charset="UTF-8" />
<meta
name="description"
content="Auth Wiki is a comprehensive collection of articles, tutorials, and resources about authentication and authorization. Learn about OAuth 2.0, OpenID Connect, SAML, and more."
content={description ??
"Auth Wiki is a comprehensive collection of articles, tutorials, and resources about authentication and authorization. Learn about OAuth 2.0, OpenID Connect, SAML, and more."}
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (!Content) {
}
---

<Layout title={title}>
<Layout title={title} description={description}>
<Topbar />
<FancyHr />
<main>
Expand Down

0 comments on commit be77c5d

Please sign in to comment.