SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
Problem one: Graph QL result is not an array with keys that I can use.
Nuxt JS, which you mention in your documentation requires the asArray setting, which I've done. But the result is still not something I can pass into the nuxt Head object, which requires an array of keys containing strings. The result from Graph QL even with the array set to true, returns a string, containing a json object rather than a json array containing strings. So I cant simply parse the string as a json object and add to the Nuxt Meta object.
Problem two: Nuxt meta site vars, and meta jsonLd - where does this go?
Im not quite sure where to parse the metaJsonLdContainer or the metaSiteVarContainer in Nuxt. do you know what i should do with this?
Problem three: how to parse in the __dangerouslyDisableSanitizers tag and to what object?
Nuxty has a dangerouslyDisableSanitizers tag option which I believe is required for the script and json meta? how do I pass this into the object?
My code so far
Here is my code so far which I've placed in my default Layout.vue component. This however does not work at all because I am aware the json objects do not contain keys, they instead contain strings and also im not sure where the json or site var objects go.
The error I get with this is info.meta.filter is not a function but i expect thats the tip of the ice burg of problems here.
Some help would be really appreciated and I expect you'll know what to do here as I know you mention Nuxt as an example use case for the headless API.
Problem one: Graph QL result is not an array with keys that I can use.
Nuxt JS, which you mention in your documentation requires the
asArray
setting, which I've done. But the result is still not something I can pass into the nuxt Head object, which requires an array of keys containing strings. The result from Graph QL even with the array set to true, returns a string, containing a json object rather than a json array containing strings. So I cant simply parse the string as a json object and add to the Nuxt Meta object.Problem two: Nuxt meta site vars, and meta jsonLd - where does this go?
Im not quite sure where to parse the metaJsonLdContainer or the metaSiteVarContainer in Nuxt. do you know what i should do with this?
Problem three: how to parse in the __dangerouslyDisableSanitizers tag and to what object?
Nuxty has a dangerouslyDisableSanitizers tag option which I believe is required for the script and json meta? how do I pass this into the object?
My code so far
Here is my code so far which I've placed in my default Layout.vue component. This however does not work at all because I am aware the json objects do not contain keys, they instead contain strings and also im not sure where the json or site var objects go. The error I get with this is
info.meta.filter is not a function
but i expect thats the tip of the ice burg of problems here.Some help would be really appreciated and I expect you'll know what to do here as I know you mention Nuxt as an example use case for the headless API.
The output of console logging the data object is: