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:

  • Blog for the blog index
  • BlogPosting for 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:

page.tsx
import { JsonLd } from '@repo/seo/json-ld';
import type { WithContext, YourInterface } from '@repo/seo/json-ld';

const jsonLd: WithContext<YourInterface> = {
  // ...
};

return <JsonLd code={jsonLd} />;

On this page

GitHubEdit this page on GitHub