Skip to content
svead

More Schema Types

FAQ Page - Frequently Asked Questions

For FAQ pages with question/answer pairs:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const faq_schema: SchemaOrgProps['schema'] = {
5		'@type': 'FAQPage',
6		mainEntity: [
7			{
8				'@type': 'Question',
9				name: 'What is Svead?',
10				acceptedAnswer: {
11					'@type': 'Answer',
12					text: 'Svead is a Svelte component for managing SEO meta tags and structured data.',
13				},
14			},
15			{
16				'@type': 'Question',
17				name: 'How do I install Svead?',
18				acceptedAnswer: {
19					'@type': 'Answer',
20					text: 'Install with: pnpm add -D svead',
21				},
22			},
23		],
24	};
25</script>
26
27<SchemaOrg schema={faq_schema} />

Product - E-commerce Product Pages

For product pages with pricing and reviews:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const product_schema: SchemaOrgProps['schema'] = {
5		'@type': 'Product',
6		name: 'Product Name',
7		image: 'https://example.com/product-image.jpg',
8		description: 'Product description here',
9		brand: {
10			'@type': 'Brand',
11			name: 'Brand Name',
12		},
13		offers: {
14			'@type': 'Offer',
15			url: 'https://example.com/product',
16			priceCurrency: 'USD',
17			price: '29.99',
18			availability: 'https://schema.org/InStock',
19			seller: {
20				'@type': 'Organization',
21				name: 'Example Store',
22			},
23		},
24		aggregateRating: {
25			'@type': 'AggregateRating',
26			ratingValue: '4.5',
27			reviewCount: '24',
28		},
29	};
30</script>
31
32<SchemaOrg schema={product_schema} />

Recipe - Recipe Pages

For recipe and food content:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const recipe_schema: SchemaOrgProps['schema'] = {
5		'@type': 'Recipe',
6		name: 'Chocolate Chip Cookies',
7		image: 'https://example.com/cookie-image.jpg',
8		description: 'Classic chocolate chip cookie recipe',
9		author: {
10			'@type': 'Person',
11			name: 'Chef Name',
12		},
13		datePublished: '2023-08-22',
14		prepTime: 'PT15M',
15		cookTime: 'PT12M',
16		totalTime: 'PT27M',
17		recipeYield: '24 cookies',
18		recipeIngredient: [
19			'2 cups flour',
20			'1 cup butter',
21			'1 cup chocolate chips',
22		],
23		recipeInstructions: [
24			{
25				'@type': 'HowToStep',
26				text: 'Preheat oven to 350°F',
27			},
28			{
29				'@type': 'HowToStep',
30				text: 'Mix ingredients',
31			},
32		],
33		nutrition: {
34			'@type': 'NutritionInformation',
35			calories: '150 calories',
36		},
37	};
38</script>
39
40<SchemaOrg schema={recipe_schema} />

Event - Events and Conferences

For event pages:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const event_schema: SchemaOrgProps['schema'] = {
5		'@type': 'Event',
6		name: 'Conference Name 2024',
7		description: 'Annual web development conference',
8		startDate: '2024-09-15T09:00:00-05:00',
9		endDate: '2024-09-17T17:00:00-05:00',
10		eventStatus: 'https://schema.org/EventScheduled',
11		eventAttendanceMode:
12			'https://schema.org/OfflineEventAttendanceMode',
13		location: {
14			'@type': 'Place',
15			name: 'Convention Center',
16			address: {
17				'@type': 'PostalAddress',
18				streetAddress: '123 Main St',
19				addressLocality: 'City',
20				addressRegion: 'ST',
21				postalCode: '12345',
22				addressCountry: 'US',
23			},
24		},
25		offers: {
26			'@type': 'Offer',
27			url: 'https://example.com/tickets',
28			price: '299',
29			priceCurrency: 'USD',
30			availability: 'https://schema.org/InStock',
31			validFrom: '2023-12-01T00:00:00',
32		},
33		organizer: {
34			'@type': 'Organization',
35			name: 'Event Organizer',
36			url: 'https://example.com',
37		},
38	};
39</script>
40
41<SchemaOrg schema={event_schema} />

HowTo - Tutorial and Guide Pages

For how-to guides and tutorials:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const howto_schema: SchemaOrgProps['schema'] = {
5		'@type': 'HowTo',
6		name: 'How to Install Svead',
7		description: 'Step-by-step guide to install Svead in SvelteKit',
8		image: 'https://example.com/tutorial-image.jpg',
9		totalTime: 'PT5M',
10		tool: [
11			{
12				'@type': 'HowToTool',
13				name: 'Terminal',
14			},
15		],
16		step: [
17			{
18				'@type': 'HowToStep',
19				name: 'Install Package',
20				text: 'Run: pnpm add -D svead',
21			},
22			{
23				'@type': 'HowToStep',
24				name: 'Import Component',
25				text: 'Import Head and SchemaOrg from svead',
26			},
27			{
28				'@type': 'HowToStep',
29				name: 'Configure',
30				text: 'Add configuration object',
31			},
32		],
33	};
34</script>
35
36<SchemaOrg schema={howto_schema} />

Video - Video Content

For video content pages:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const video_schema: SchemaOrgProps['schema'] = {
5		'@type': 'VideoObject',
6		name: 'Video Title',
7		description: 'Video description',
8		thumbnailUrl: 'https://example.com/thumbnail.jpg',
9		uploadDate: '2023-08-22T08:00:00Z',
10		duration: 'PT1M30S',
11		contentUrl: 'https://example.com/video.mp4',
12		embedUrl: 'https://example.com/embed/video',
13	};
14</script>
15
16<SchemaOrg schema={video_schema} />

Course - Educational Content

For online courses and educational content:

Svelte
1<script lang="ts">
2	import { SchemaOrg, type SchemaOrgProps } from 'svead';
3
4	const course_schema: SchemaOrgProps['schema'] = {
5		'@type': 'Course',
6		name: 'Learn SvelteKit',
7		description: 'Comprehensive SvelteKit course',
8		provider: {
9			'@type': 'Organization',
10			name: 'Education Platform',
11			url: 'https://example.com',
12		},
13		offers: {
14			'@type': 'Offer',
15			category: 'Paid',
16			price: '99',
17			priceCurrency: 'USD',
18		},
19		hasCourseInstance: {
20			'@type': 'CourseInstance',
21			courseMode: 'online',
22			courseWorkload: 'PT20H',
23		},
24	};
25</script>
26
27<SchemaOrg schema={course_schema} />
All documentation