Try to use a different schema setup.

main
Zed A. Shaw 1 year ago
parent 2b11387d4e
commit 855e5603e8
  1. 16
      client/components/SEOTricks.svelte

@ -27,9 +27,9 @@
export let language = "en"; export let language = "en";
export let json_ld = { export let schema_context = "http://schema.org";
"@context": "http://schema.org", export let schema_type = "WebSite";
"@type": "WebSite", export let schema_data = {
"name": og.title, "name": og.title,
"url": og.url, "url": og.url,
"sameAs": [`https://twitter.com/${twitter.site}`], "sameAs": [`https://twitter.com/${twitter.site}`],
@ -38,10 +38,12 @@
<svelte:head> <svelte:head>
<meta name="description" content={ og.description }> <meta name="description" content={ og.description }>
<!-- JSON-LD spec --> <!-- SCHEMA.org spec -->
<script type="application/ld+json"> <div itemscope itemtype="{schema_context}/{schema_type}">
{ JSON.stringify(json_ld) } {#each Object.keys(schema_data) as key}
</script> <meta itemprop={ key } content={ schema_data[key] }>
{/each}
</div>
<!--OG Spec for LinkedIn/Facebook/Others --> <!--OG Spec for LinkedIn/Facebook/Others -->
{#each Object.keys(og) as key} {#each Object.keys(og) as key}

Loading…
Cancel
Save