JSON-LD Schema Examples
This page demonstrates various JSON-LD structured data schemas. View the page source to see the generated JSON-LD scripts in the <head> section.
Available Schema Types
- Organization - Company/organization information
- LocalBusiness - Local business with location and hours
- Article - Blog posts and articles
- Product - E-commerce products with pricing and reviews
- FAQPage - Frequently asked questions
- WebSite - Website with search functionality
- BreadcrumbList - Navigation breadcrumbs
- Event - Events with dates and locations
- VideoObject - Video content metadata
Testing Your Schema
Use these tools to validate your structured data:
Usage Example
---
import Schema from '~/components/common/Schema.astro';
import { createArticleSchema } from '~/utils/schema';
const schema = createArticleSchema({
headline: 'My Article Title',
datePublished: '2024-01-15T08:00:00Z',
author: {
'@type': 'Person',
name: 'Author Name'
},
publisher: {
name: 'Your Site'
},
url: Astro.url.href,
});
---
<Layout>
<Schema schema={schema} />
<!-- Your page content -->
</Layout> Note: This demo page should be removed or moved to src/client/pages/ in production
to avoid exposing example data to search engines.