Open innocenzi opened 1 year ago
It seems like if I use useHead
directly, I do get my graph generated:
useHead({
script: [
{
type: 'application/ld+json',
id: 'schema-org-graph',
key: 'schema-org-graph',
// @ts-expect-error runtime type
nodes: [
defineOrganization({
name: seo.sitename,
logo: seo.logo,
address: seo.address,
}),
defineWebSite({
name: seo.sitename,
description: seo.description,
inLanguage: seo.language,
url: import.meta.env.APP_URL,
}),
],
},
],
}, { mode: 'all' })
Hey, so I'm not sure the fact that we don't use Vue Router is the actual problem, but we're trying to implement
schema-org
in a Hybridly app (a server-driven SPA), but the schema never gets generated.@vueuse/head
works perfectly fine, and my understanding is thatschema-org
uses it under the hood, so I'm wondering if this has something to do with the router.This is how we register the plugin:
The
<SchemaOrgDebug />
is totally empty, nothing in it. The tag is nowhere to be seen, neither in<head>
or at the bottom of<body>
. Any idea?Notes:
useProperty('security.url')
is aref
that returns the current page's URLuseHead
anduseSeoMeta
work properly everywhere