misc: change svelte:head
This commit is contained in:
1 parent
39ce616d0d
commit
ff3246c0a6
5 files changed
+36
-52
No files matched your search
@@ -18,6 +18,7 @@
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import CommunityCard from '$lib/components/community/CommunityCard.svelte'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import { page } from '$app/stores'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -41,6 +42,14 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>{data.post.post_view.post.name}</title>
|
||||
<meta property="og:title" content={data.post.post_view.post.name} />
|
||||
<meta property="og:url" content={$page.url.toString()} />
|
||||
{#if isImage(post.url)}
|
||||
<meta property="og:image" content={post.url} />
|
||||
{/if}
|
||||
{#if post.body}
|
||||
<meta property="og:description" content={post.body} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
|
||||
Reference in new issue
Block a user