svelte-meta-tags/README.md
2021-07-15 18:42:29 +09:00

10 KiB

svelte-meta-tags

⚠️ Expect bugs!

Svelte Meta Tags is a lightweight library for SEO in Svelte (Made with SvelteKit)

Usage

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

<MetaTags title="Example Title" description="Example Description." />

Properties

Property Type Description
title string Sets the page meta title.
description string Sets the page meta description.
noindex boolean (default false) Sets whether page should be indexed or not..
nofollow boolean (default false) Sets whether page should be followed or not..
keywords string Set the page keywords.
canonical string Set the page canonical url.
openGraph.type string The type of your object. Depending on the type you specify, other properties may also be required
openGraph.title string The open graph title, this can be different than your meta title.
openGraph.description string The open graph description, this can be different than your meta description.
openGraph.url string The canonical URL of your object that will be used as its permanent ID in the graph.
openGraph.images object[] An array of images to be used as a preview. If multiple supplied you can choose one when sharing.
openGraph.article.publishedTime datetime When the article was first published. .
openGraph.article.modifiedTime datetime When the article was last changed.
openGraph.article.expirationTime datetime When the article is out of date after.
openGraph.article.authors string[] Writers of the article.
openGraph.article.section string A high-level section name. E.g. Technology
openGraph.article.tags string[] Tag words associated with this article.
twitter.site string The Twitter @username the card should be attributed to.
twitter.title string A concise title for the related content. Note- iOS, Android: Truncated to two lines in timeline and expanded Tweet ; Web: Truncated to one line in timeline and expanded Tweet
twitter.description string A description that concisely summarizes the content as appropriate for presentation within a Tweet. You should not re-use the title as the description or use this field to describe the general services provided by the website. Note- iOS, Android: Not displayed ; Web: Truncated to three lines in timeline and expanded Tweet
twitter.image string(url) A URL to a unique image representing the content of the page. Images for this Card support an aspect ratio of 2:1 with minimum dimensions of 300x157 or maximum of 4096x4096 pixels. Images must be less than 5MB in size. JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. SVG is not supported.
twitter.imageAlt string A text description of the image conveying the essential nature of an image to users who are visually impaired. Maximum 420 characters.
jsonLd object Data in ld+json format. .

License

MIT