Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-meta

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-meta

Easily generate SEO metadata for Svelte

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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://mypage.com/"
/>

Properties

PropertyTypeMetadata Set
titlestring<title>, title, og:title
descriptionstringdescription, og:description
imagestring{ url: string; width: number; height: number; alt: string}, og:image
urlstringcanonical, og:url
logoUrlstringJSON-LD
searchUrlstringJSON-LD
sitemapUrlstringsitemap
twitter{ title: string; description: string; card: string, site: string, creator: string }twitter:
openGraph{ type: string; imageWidth: number; imageHeight: number; imageAlt: string; locale: string; site_name: string }og:

Notes

  • Twitter inherits Open Graph (og:) properties if twitter: specific metadata is not set, which is why svelte-meta doesn't include them
  • searchUrl must include a query param with the name search_term_string e.g. https://google.com/search?q={search_term_string}
  • For an overview of twitter properties, visit the Twitter Developer docs
  • For an overview of openGraph properties, visit the OpenGraph website

Keywords

FAQs

Package last updated on 19 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc