1.0.2 • Published 3 years ago

svelte-meta v1.0.2

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

Svelte Meta

NPM License

Easily generate SEO metadata for Svelte.

Features

  • Automatically set relevant social meta tags common attributes like title and description
  • Automatically set relevant JSON-LD metadata
  • Shorthands for setting Open Graph and Twitter metadata
  • Shorthands for setting URL, Sitemap, and other technical SEO data

Usage

npm i svelte-meta
<script>
  import Meta from 'svelte-meta';
</script>

<Meta
  title="My Page"
  description="It's a great page"
  image="/cover.png"
  url="https://website.com/page
/>

Properties

PropertyTypeDescriptionMetadata Set
titlestringTitle of your project<title>, title, og:title
descriptionstringDescriptoin of your projectdescription, og:description
imagestring or { url: string; width: number; height: number; alt: string}Image for social networksog:image
urlstringURL of the current pagecanonical og:url
siteUrlstringRoot URL of your websiteJSON-LD
logostringLogo image for your brandJSON-LD
searchstringSearch page base URLJSON-LD
sitemapstringURL of your sitemapsitemap
openGraphInherits other properties, plus custom og: properties, eg: videoOpenGraph propertiesog:

Notes

  • Twitter inherits Open Graph (og:) properties if twitter: specific metadata is not set, which is why svelte-meta doesn't include them
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago