marie77e → credited TurtlBbx → .
Please try this, if it works:
useHead({
title: page.value.title,
meta: page.value.metatags.meta,
link: page.value.metatags.link,
script: [
{
key: 'ldjson-schema',
id: 'ldjson-schema',
type: 'application/ld+json',
children: JSON.stringify(page.value.metatags.jsonld || []),
},
],
})
I'm not sure what you're trying to do. Are you using the "catchall" page code that can be found in the nuxtjs-drupal-ce playground?
By using that, metadata should just work (without changes to the Drupal module):
useHead({
title: page.value.title,
meta: page.value.metatags.meta,
link: page.value.metatags.link,
})
This would be a breaking change for existing Nuxt projects. One would have to move components in Nuxt projects in a sub-folder "Drupal" or write additional component config in nuxt config file or have prefixed component names with "Drupal". It adds another layer to think about when developing frontend, I don't like that.
What I'm doing right now in a Nuxt 3 project is, I put all drupal custom-elements in a subfolder "global". That way the components are grouped and are global (Dynamic Components) without the need for additional components config and can be rendered with Vue Render Function API (nuxtjs-drupal-ce renderCustomElements helper uses it). Other components, that are not rendered with Vue Render Function API, don't need to be global.