Automated Structured Data
Structured data is an important SEO tool that helps search engines better understand, categorize, and make sense of the content you publish. It’s also a crucial piece for getting your content to appear as rich results — something that can dramatically impact your site’s engagement metrics.
That’s why JamComments will automatically build and embed structured data for the comments on your site, even integrating it with your existing “BlogPost” or “Article” entities.
Two Approachs to Automated Structured Data
In order to balance ease of configuration with robustness, JamComments takes two approaches to building & embedding structured data: client-side and server-rendered.
The Client-Side Approach
By default, JamComments will embed data for your comments with client-side JavaScript. This allows us to easily merge that data into your existing JSON-LD without you needing to configure anything. The plugin you’re using will automatically generate the data, find the nearest “BlogPosting” or “Article” entity on the page (these are the only two types currently supported), and merge it in. No work necessary, and it works in every integration.
The Server-Side Approach
Using JavaScript to embed this data is fully recognized and documented by Google. However if you’d like to maximize the accessibility of the data for other web crawlers that may not support JavaScript rendering, you can also have the JSON server-rendered.
This feature is currently only supported in the Astro integration, but will soon be rolled out to all others as well. It just requires you to give your page schema to the <JamComments schema={yourSchema}>
component, rather than rendering it yourself. Your comment data will be build and merged, and then the data will be built into the page’s HTML. For more information on this approach, see the Astro integration docs.
A Glimpse of the Result
Regardless of the approach you take, here’s an example of what you’ll see after your site is built:
Validating the Result
You’re highly encouraged to validate the data generated for any of your pages. Here are the best two places to start.