Svead - Svelte Head Component
Svead, a component that allows you to set head meta information,
canonical, title, Twitter and Facebook Open Graph tags.
Props
It takes the following props:
Required props
title
=> page titledescription
=> page descriptionurl
=> Full URL of the current page
Optional props
authorName
=> Author Nameimage
=> Open Graph image for use in Twitter, Facebook, etc.paymentPointer
=> Web Monetisation Payment pointerwebsite
=> Website URL for use in Twitter metatag content.
Use it
npm install svead
Import it into your Svelte pages and use:
<script>
import { page } from '$app/stores'
import { Head } from 'svead'
let title = 'This is Svead a Svelte Head Component'
let description =
'Svead, a component that allows you to set head meta information, canonical, title, Twitter and Facebook Open Graph tags.'
let url = $page.url.toString()
</script>
<Head {title} {description} {image} {url} />
Developing locally
If you have cloned this locally and are making changes to the
component, install it locally (link:package
) with:
pnpm run package
pnpm i -D ./package
pnpm package:local