Add more OG tags and title tags
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Kaan Barmore-Genç 2024-05-10 23:42:18 -05:00
parent 1ea2a5df91
commit 9ab243fa4e
Signed by: kaan
GPG key ID: B2E280771CD62FCF
5 changed files with 33 additions and 2 deletions

View file

@ -12,7 +12,8 @@
</script>
<svelte:head>
<meta property="og:title" content="Kaan Barmore-Genç" />
<title>Kaan Barmore-Genç's Site</title>
<meta property="og:title" content="Kaan Barmore-Genç's Site" />
<meta property="og:type" content="profile" />
<meta property="profile:first_name" content="Kaan" />
<meta property="profile:last_name" content="Barmore-Genç" />

View file

@ -1,15 +1,28 @@
<script lang="ts">
import { format, formatISO } from 'date-fns';
import Jpeg from '../profile.avif?format=jpeg';
export let data;
</script>
<svelte:head>
<title>{data.title} - Kaan Barmore-Genç</title>
<meta property="og:title" content={`${data.title} - Kaan Barmore-Genç`} />
<meta property="og:type" content="article" />
<meta property="article:author" content="https://bgenc.net" />
<meta property="og:url" content={`https://bgenc.net/${data.slug}/`} />
<meta property="article:published_time" content={formatISO(new Date(data.date))} />
{#if data.image}
<meta property="og:image" content={data.image} />
{:else}
<meta property="og:image" content={`https://bgenc.net${Jpeg}`} />
{/if}
{#if data.excerpt}
<meta name="description" content={data.excerpt} />
<meta property="og:description" content={data.excerpt} />
{/if}
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="Kaan Barmore-Genç's Site" />
</svelte:head>
<article data-pagefind-body>

View file

@ -1,11 +1,13 @@
export async function load({ params }) {
const post = await import(`../posts/${params.slug}.md`);
const { title, date } = post.metadata;
const { title, date, excerpt, image } = post.metadata;
const content = post.default;
return {
content,
title,
excerpt,
image,
date,
slug: params.slug,
};

View file

@ -1,3 +1,14 @@
<script>
import Jpeg from '../profile.avif?format=jpeg';
</script>
<svelte:head>
<title>Kaan Barmore-Genç's Portfolio</title>
<meta property="og:title" content="Kaan Barmore-Genç's Portfolio" />
<meta property="og:image" content={`https://bgenc.net${Jpeg}`} />
</svelte:head>
## Featured Projects
### [Bulgur Cloud](https://github.com/bulgur-cloud/bulgur-cloud) [![GitHub Repo stars](https://img.shields.io/github/stars/bulgur-cloud/bulgur-cloud)](https://github.com/bulgur-cloud/bulgur-cloud) [![Docker Pulls](https://img.shields.io/docker/pulls/seriousbug/bulgur-cloud)](https://github.com/bulgur-cloud/bulgur-cloud)

View file

@ -22,6 +22,10 @@
}
</script>
<svelte:head>
<title>Kaan Barmore-Genç's Blog Posts</title>
</svelte:head>
<ul class="years">
{#each groupPosts(data.posts).entries() as [year, posts]}
<li>