Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<script>
import { MetaTags, JsonLd } from 'svelte-meta-tags';
</script>

<h1>
Including SEO metadata in Svelte
</h1>

Check <a href="https://github.com/oekazuma/svelte-meta-tags">GitHub</a> for details!

<h2>
Where's the metadata?
</h2>

<p>
Check the DOM of the REPL!<br/>
if you look at the head tag, you can see the compiled metadata.
</p>

<MetaTags
title="Using More of Config"
titleTemplate = '%s | Svelte Meta Tags'
description="This example uses more of the available config options."
canonical="https://www.canonical.ie/"
openGraph={{
type: 'website',
url: 'https://www.example.com/page',
locale: 'en_IE',
title: 'Open Graph Title',
description: 'Open Graph Description',
images: [
{
url: 'https://www.example.ie/og-image.jpg',
alt: 'Og Image Alt',
width: 800,
height: 600,
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */