Skip to content

Commit 926b734

Browse files
committed
feat: start embed
1 parent dd3aaf5 commit 926b734

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script lang="ts">
2+
type Props = { title: string; image?: string; description?: string; websiteUrl?: string };
3+
let { title, image, description, websiteUrl }: Props = $props();
4+
</script>
5+
6+
<svelte:head>
7+
<meta name="title" content={title} />
8+
{#if description}
9+
<meta name="description" content={description} />
10+
{/if}
11+
12+
<!-- Open Graph / Facebook -->
13+
<meta property="og:type" content="website" />
14+
<meta property="og:url" content="https://metatags.io/" />
15+
<meta property="og:title" content={title} />
16+
{#if description}
17+
<meta property="og:description" content={description} />
18+
{/if}
19+
<meta property="og:image" content="https://metatags.io/images/meta-tags.png" />
20+
21+
<!-- Twitter -->
22+
<meta property="twitter:card" content="summary_large_image" />
23+
<meta property="twitter:url" content="https://metatags.io/" />
24+
<meta property="twitter:title" content={title} />
25+
{#if description}
26+
<meta property="twitter:description" content={description} />
27+
{/if}
28+
<meta property="twitter:image" content="https://metatags.io/images/meta-tags.png" />
29+
</svelte:head>

0 commit comments

Comments
 (0)