Skip to content

Commit

Permalink
Added custom tags for mastodon
Browse files Browse the repository at this point in the history
  • Loading branch information
wjtje authored Nov 14, 2024
1 parent e08de95 commit ece7e71
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/routes/[lang]/blog/post/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@
<svelte:head>
<title>{$t('common.title')} - {post.title}</title>
<meta name="description" content={post.preview} />
<!-- Custom tags for Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@wjtje_wal" />
<meta name="twitter:title" content={`${post.title} - ${$t('common.title')}`} />
<meta name="twitter:description" content={post.preview} />
<meta name="twitter:image" content={post.image ?? ''} />
<!-- Custom tags for Open Graph -->
<meta name="og:title" content={`${post.title} - ${$t('common.title')}`} />
<meta name="og:type" content="article" />
<meta name="article:published_time" content={new Date(post.createdAt).toISOString()} />
<meta name="og:description" content={post.preview} />
<meta name="og:image" content={post.image ?? ''} />
<!-- Custom tags for Mastodon -->
<meta name="fediverse:creator" content="@[email protected]">
</svelte:head>

<h1>{post.title}</h1>
Expand Down

0 comments on commit ece7e71

Please sign in to comment.