Replies: 5 comments 5 replies
-
Seeing how important this is for SEO, this should be a 1st class feature |
Beta Was this translation helpful? Give feedback.
-
+1 Although I'd prefer adding the schema functionality in the existing generateMetadata function itself to make things simpler. In our codebase, in every page we use generateMetadata and inside it we have a helper function that handles metadata that comes from a CMS. To setup schema markup, as of now we have to remember to add the script tag for JSON-LD inside the Page component in all pages. If we can get it done inside the generateMetadata function itself it will make all our pages consistent with SEO practices and we'll have to deal with less code. |
Beta Was this translation helpful? Give feedback.
-
yes, I fixed it use if else if own page res schema Markup json from server to client |
Beta Was this translation helpful? Give feedback.
-
I tested the official solution. Everthing seem doing well. I did a first quick check with Enhanced support, similar to what generateMetadata offers, would be nice, but it is merely a nice-to-have. |
Beta Was this translation helpful? Give feedback.
-
Can not putting the Json/LD script inside the head tag of the page cause SEO problems? |
Beta Was this translation helpful? Give feedback.
-
Goals
Background
The current documentation for JSON-LD on the website doesnt work when pushed to production, as it needs to be wrapped in a vanilla tag, which is not stated.
When the web page is pushed to production, Schema Markup Validator passes and Google Rich Results only sees
However if you copy and paste the entire website html code from the browsers development tools into the code test on rich results it DOES pass as the javascript has had time to run.
Proposal
I believe copying a similar structure to generateMetadata will work for generateStructuredData and adding in schema-dts as a dependency for next would be cool too.
Beta Was this translation helpful? Give feedback.
All reactions