SEO
JSON-LD
How we've implemented JSON-LD structured data.
Default Configuration
@repo/seo carries a JSON-LD helper that emits validated Google structured data.
By default, structured data is implemented on the following pages:
Blogfor the blog indexBlogPostingfor the blog post pages
Usage
Our @repo/seo package provides a JSON+LD helper built on schema-dts, allowing for structured data generation in a type-safe way. You can declare your own JSON+LD implementations like so:
import { JsonLd } from '@repo/seo/json-ld';
import type { WithContext, YourInterface } from '@repo/seo/json-ld';
const jsonLd: WithContext<YourInterface> = {
// ...
};
return <JsonLd code={jsonLd} />;