fix: Move JSON-LD scripts to head nodes

This commit is contained in:
oSumAtrIX
2023-09-15 17:19:44 +02:00
parent f1e8fd0651
commit e39632dc2e
7 changed files with 57 additions and 27 deletions

View File

@@ -1,26 +1,34 @@
<script lang="ts">
let _title: string = "";
$: title = _title === "" ? "ReVanced" : `ReVanced · ${_title}`;
import { JsonLd } from 'svelte-meta-tags';
export { _title as title };
let _title: string = '';
$: title = _title === '' ? 'ReVanced' : `ReVanced · ${_title}`;
export let description: string = "Continuing the legacy of Vanced.";
export { _title as title };
export let description: string = 'Continuing the legacy of Vanced.';
export let schema: any | undefined;
</script>
<svelte:head>
<title>{title}</title>
<meta name="description" content={description} />
<title>{title}</title>
<meta name="description" content={description} />
<meta name="theme-color" content="#9FD5FF" />
<!-- OpenGraph -->
<!-- OpenGraph -->
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:type" content="website" />
<meta property="og:image" content="/embed.png" />
<!-- Twitter -->
<!-- Twitter -->
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" itemprop="image" content="/embed.png" />
<meta name="twitter:card" content="summary" />
{#if schema}
<JsonLd {schema} />
{/if}
</svelte:head>