Add some SEO metas (WIP)
This commit is contained in:
24
src/utils/SocialMetas.svelte
Normal file
24
src/utils/SocialMetas.svelte
Normal file
@@ -0,0 +1,24 @@
|
||||
<script>
|
||||
export let ogType = 'website'
|
||||
export let twCard = 'summary_large_image'
|
||||
export let url = ''
|
||||
export let title = ''
|
||||
export let description = ''
|
||||
export let image
|
||||
</script>
|
||||
|
||||
<meta property="og:type" content={ogType}>
|
||||
<meta property="og:url" content={url}>
|
||||
<meta property="og:title" content={title}>
|
||||
<meta property="og:description" content={description}>
|
||||
{#if image}
|
||||
<meta property="og:image" content={image}>
|
||||
{/if}
|
||||
|
||||
<meta property="twitter:card" content={twCard}>
|
||||
<meta property="twitter:url" content={url}>
|
||||
<meta property="twitter:title" content={title}>
|
||||
<meta property="twitter:description" content={description}>
|
||||
{#if image}
|
||||
<meta property="twitter:image" content={image}>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user