Svead

Quick Reference

Installation

pnpm add -D svead

Basic Usage

<script lang="ts">
	import { Head, SchemaOrg } from 'svead';
	import type { SeoConfig, SchemaOrgProps } from 'svead';

	const seo_config: SeoConfig = {
		title: 'Page Title',
		description: 'Page description',
		url: 'https://example.com',
	};

	const schema: SchemaOrgProps['schema'] = {
		'@type': 'WebPage',
		name: 'Page Title',
	};
</script>

<Head {seo_config} />
<SchemaOrg {schema} />

Common Patterns Cheatsheet

Use CaseComponentSchema Type
Basic SEOHeadN/A
Blog PostBothBlogPosting
ArticleBothArticle
News ArticleBothNewsArticle
Product PageBothProduct
RecipeBothRecipe
EventBothEvent
FAQBothFAQPage
TutorialBothHowTo
VideoBothVideoObject
CourseBothCourse
Breadcrumbs OnlySchemaOrgBreadcrumbList

For more information and full documentation, visit the Svead GitHub repository.