-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8a4f58
commit 1e0834a
Showing
4 changed files
with
67 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<script lang="ts"> | ||
// Define optional props without default values | ||
export let title: string | undefined = undefined; | ||
export let description: string | undefined = undefined; | ||
export let url: string | undefined = undefined; | ||
export let image: string | undefined = undefined; | ||
export let type: string | undefined = undefined; | ||
</script> | ||
|
||
<svelte:head> | ||
<!-- Primary Meta Tags --> | ||
{#if title} | ||
<meta name="title" content={title} /> | ||
{/if} | ||
{#if description} | ||
<meta name="description" content={description} /> | ||
{/if} | ||
|
||
<!-- Open Graph / Facebook --> | ||
{#if url} | ||
<meta property="og:url" content={url} /> | ||
{/if} | ||
{#if title} | ||
<meta property="og:title" content={title} /> | ||
{/if} | ||
{#if description} | ||
<meta property="og:description" content={description} /> | ||
{/if} | ||
{#if image} | ||
<meta property="og:image" content={image} /> | ||
{/if} | ||
|
||
{#if type} | ||
<meta property="og:type" content={type} /> | ||
{/if} | ||
|
||
<!-- Twitter --> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
{#if url} | ||
<meta property="twitter:url" content={url} /> | ||
{/if} | ||
{#if title} | ||
<meta property="twitter:title" content={title} /> | ||
{/if} | ||
{#if description} | ||
<meta property="twitter:description" content={description} /> | ||
{/if} | ||
{#if image} | ||
<meta property="twitter:image" content={image} /> | ||
{/if} | ||
</svelte:head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters