feat: add og title and description
All checks were successful
/ Build (push) Successful in 54s

This commit is contained in:
log101 2024-08-13 17:53:06 +03:00
parent 84eca010c8
commit 209f61b856
3 changed files with 13 additions and 6 deletions

View File

@ -1,7 +1,7 @@
---
draft: false
title: İlk Katkınızın Hikayesi
summary: ık kaynak geliştiriciliğe dair izlenimler.
summary: İlk açık kaynak katkınızı yapmak sandığınızdan çok daha kolay olacak!
category: fikir
subcategory: Rehber
date: 2024-08-11

View File

@ -2,9 +2,10 @@
interface Props {
title: string;
ogTitle?: string;
ogDescription?: string;
}
const { title, ogTitle } = Astro.props;
const { title, ogTitle, ogDescription } = Astro.props;
import "../styles/main.css";
---
@ -18,9 +19,12 @@ import "../styles/main.css";
<meta name="generator" content={Astro.generator} />
<meta name="htmx-config" content='{"code": 204, "swap": false}' />
<meta property="og:title" content="blog.log101.dev" />
<meta property="og:title" content={ogTitle ?? "blog.log101.dev"} />
<meta property="og:url" content="https://blog.log101.dev" />
<meta property="og:description" content={ogTitle} />
<meta
property="og:description"
content={ogDescription ?? "Yazılıma dair..."}
/>
<meta property="og:image" content="https://blog.log101.dev/ikon.png" />
<meta name="twitter:card" content="summary" />

View File

@ -29,7 +29,10 @@ export async function getStaticPaths() {
}
---
<Layout title="log101" ogTitle="İlk Açık Kaynak Katkınızın Hikayesi">
<Layout
title="log101"
ogTitle={entry.data.title}
ogDescription={entry.data.summary}>
<Header />
{
entry.collection === "blog" ? (