mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 22:24:31 +02:00
feat: dynamically add socials to JSON-LD
This commit is contained in:
parent
e39632dc2e
commit
aed3c7ca58
@ -1,5 +1,7 @@
|
||||
<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}`;
|
||||
@ -9,6 +11,11 @@
|
||||
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);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -20,15 +20,7 @@
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: 'https://revanced.app/embed.png'
|
||||
},
|
||||
sameAs: [
|
||||
'https://github.com/revanced',
|
||||
'https://twitter.com/revancedapp',
|
||||
'https://revanced.app/discord',
|
||||
'https://www.reddit.com/r/revancedapp',
|
||||
'https://t.me/app_revanced',
|
||||
'https://www.youtube.com/@ReVanced'
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
@ -28,15 +28,7 @@
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: 'https://revanced.app/embed.png'
|
||||
},
|
||||
sameAs: [
|
||||
'https://github.com/revanced',
|
||||
'https://twitter.com/revancedapp',
|
||||
'https://revanced.app/discord',
|
||||
'https://www.reddit.com/r/revancedapp',
|
||||
'https://t.me/app_revanced',
|
||||
'https://www.youtube.com/@ReVanced'
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
@ -54,15 +54,7 @@
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: 'https://revanced.app/embed.png'
|
||||
},
|
||||
sameAs: [
|
||||
'https://github.com/revanced',
|
||||
'https://twitter.com/revancedapp',
|
||||
'https://revanced.app/discord',
|
||||
'https://www.reddit.com/r/revancedapp',
|
||||
'https://t.me/app_revanced',
|
||||
'https://www.youtube.com/@ReVanced'
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
@ -67,15 +67,7 @@
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: 'https://revanced.app/embed.png'
|
||||
},
|
||||
sameAs: [
|
||||
'https://github.com/revanced',
|
||||
'https://twitter.com/revancedapp',
|
||||
'https://revanced.app/discord',
|
||||
'https://www.reddit.com/r/revancedapp',
|
||||
'https://t.me/app_revanced',
|
||||
'https://www.youtube.com/@ReVanced'
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
@ -122,15 +122,7 @@
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: 'https://revanced.app/embed.png'
|
||||
},
|
||||
sameAs: [
|
||||
'https://github.com/revanced',
|
||||
'https://twitter.com/revancedapp',
|
||||
'https://revanced.app/discord',
|
||||
'https://www.reddit.com/r/revancedapp',
|
||||
'https://t.me/app_revanced',
|
||||
'https://www.youtube.com/@ReVanced'
|
||||
]
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user