mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-21 18:13:56 +00:00
fix: Use correct rich results schemas
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { JsonLd } from 'svelte-meta-tags';
|
||||
import { queries } from '$data/api';
|
||||
import { createQuery } from '@tanstack/svelte-query';
|
||||
|
||||
let _title: string = '';
|
||||
$: title = _title === '' ? 'ReVanced' : `ReVanced · ${_title}`;
|
||||
@@ -10,12 +8,7 @@
|
||||
|
||||
export let description: string = 'Continuing the legacy of Vanced.';
|
||||
|
||||
export let schema: any | undefined;
|
||||
|
||||
createQuery(['socials'], queries.socials).subscribe((query) => {
|
||||
schema.publisher.sameAs = query.data?.socials?.map((social) => social.url);
|
||||
});
|
||||
|
||||
export let schemas: any[] | undefined;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -27,15 +20,17 @@
|
||||
<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" />
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
|
||||
<!-- 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:image" itemprop="image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
{#if schema}
|
||||
<JsonLd {schema} />
|
||||
{#if schemas}
|
||||
{#each schemas as schema}
|
||||
<JsonLd {schema} />
|
||||
{/each}
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user