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

@svelte-bin/seo

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svelte-bin/seo

Enhance the search engine and social media optimization of your Svelte application effortlessly using SEO. This user-friendly and potent package streamlines the process by incorporating crucial elements such as meta tags, Open Graph, Twitter Card tags, an

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@svelte-bin/seo

Enhance the search engine and social media optimization of your Svelte application effortlessly using SEO. This user-friendly and potent package streamlines the process by incorporating crucial elements such as meta tags, Open Graph, Twitter Card tags, and JSON-LD into your pages. Elevate your website's visibility and search result ranking with Svelte SEO.

Installation

npm install -D @svelte-bin/seo

Usage

Basic Usage

To add basic meta tags like "title" and "description" you can import the package and use it like this:

<script>
	import { SvelteSeo } from '@svelte-bin/seo';
</script>

<SvelteSeo title="Simple page title" description="Simple description about a page" />

Advanced Usage

<script>
	import { SvelteSeo } from '@svelte-bin/seo';
</script>

<SvelteSeo
	title="Primal Movement | Natural Movement for Better Health"
	description="Learn about primal movement exercises and how they can benefit your fitness."
	canonical="https://www.primal-movement.com/"
	keywords="primal movement, natural movement, squatting, lunging, crawling, jumping, fitness"
	openGraph={{
		title: 'Primal Movement | Natural Movement for Better Health',
		description: 'Learn about primal movement exercises and how they can benefit your fitness.',
		image: 'https://www.primal-movement.com/images/squatting.jpg',
		url: 'https://www.primal-movement.com/',
		type: 'website',
		images: [
			{
				url: 'https://www.primal-movement.com/images/squatting.jpg',
				width: 800,
				height: 600,
				alt: 'Squatting'
			},
			{
				url: 'https://www.primal-movement.com/images/lunging.jpg',
				width: 900,
				height: 800,
				alt: 'Crawling'
			},
			{
				url: 'https://www.primal-movement.com/images/crawling.jpg',
				alt: 'Jumping'
			},
			{
				url: 'https://www.primal-movement.com/images/jumping.jpg'
			}
		],
		site_name: 'Primal Movement'
	}}
	twitter={{
		card: 'summary_large_image',
		site: '@primalmovement',
		title: 'Primal Movement | Natural Movement for Better Health',
		description: 'Learn about primal movement exercises and how they can benefit your fitness.',
		image: 'https://www.primal-movement.com/images/squatting.jpg'
	}}
	facebook={{
		appId: '1234567890'
	}}
/>

Properties

PropertyTypeDescription
titlestringA page title that will appear in search results.
descriptionstringA page description that will appear in search results.
keywordsstringKeywords that give search engines more information about the content of the page.
basestringA default URL and target for all links on a page.
applicationNamestringThe name of the web application that the page represents.
themeColorstringA suggested color that user agents should use to customize the display of the page or the surrounding user interface.
nofollowboolean (default false)Prevents Googlebot from following any links on the page.
noindexboolean (default false)Prevents the page from being included in the index.
nositelinkssearchboxboolean (default false)Opt out of Google's Sitelinks search box.
notranslatebooleanPrevents Google from translating the page.
canonicalstringThe canonical URL of the page.
ampstringA URL to the AMP version of the webpage.
manifeststringThe URL to a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device.
languageAlternatesArray<{ hreflang: string; href: string }>Provides Google with information about the variations of your content in other languages.
twitter.titlestringThe title of the content, maximum 70 characters.
twitter.descriptionstringA description of the content, maximum 200 characters.
twitter.imagestringThe URL of an image to use in the Twitter card. Images must be less than 5MB in size.
twitter.imageAltstringA text description of the image conveying its essential nature to visually impaired users. Maximum 420 characters.
twitter.card"summary" , "summary_large_image" , "player" , "app"The type of Twitter card to use.
twitter.sitestringThe @username of the website.
twitter.creatorstringThe @username of the content creator.
twitter.playerstringThe HTTPS URL of the player iframe.
twitter.playerWidthstringThe width of the iframe in pixels.
twitter.playerHeightstringThe height of the iframe in pixels.
twitter.playerStreamstringThe URL to the raw video or audio stream.
twitter.appNameIphonestringThe name of your iPhone app.
twitter.appUrlIphonestringThe custom URL scheme for your app on iPhone (include ”://” after your scheme name)
twitter.appNameIpadstringThe name of your iPad-optimized app
twitter.appIdIpadstringYour app's ID in the iTunes App Store
twitter.appNameGoogleplaystringThe name of your Android app
twitter.appIdGoogleplaystringYour app's ID in the Google Play Store
twitter.appUrlGoogleplaystringThe custom URL scheme for your app on Google Play
facebook.appIdstringA unique number that identifies your app when you request ads from Audience Network, known as a Facebook App ID
openGraph.titlestringThe title of your object as it should appear within the graph
openGraph.typestringThe type of your object, such as "video.movie". Depending on the type, other properties may also be required.
openGraph.urlstringThe canonical URL of your object that will be used as its permanent ID in the graph
openGraph.audiostringAn audio file to accompany the content.
openGraph.audioSecure_urlstringAn alternate URL to use if the webpage requires HTTPS
openGraph.audioTypestringThe MIME type for the audio
openGraph.descriptionstringA one- or two-sentence description of your object
openGraph.determinerstringThe word that appears before the title, e.g., "the" or "a".
openGraph.localestringThe locale of the content, e.g., "en_US".
openGraph.localeAlternatestring[]Alternate locales for the content. https://ogp.me/#array
openGraph.site_namestringThe name of the website where the content is hosted.
openGraph.imagesArrayProperties about images related to the web page.
openGraph.videosOpenGraphVideoProperties about videos related to the web page.
openGraph.musicOpenGraphMusicOpenGraph for music files.
openGraph.movieOpenGraphMovieOpenGraph for a movie.
openGraph.articleOpenGraphArticleOpenGraph for an article.
openGraph.bookOpenGraphBookOpenGraph for a book.
openGraph.profileOpenGraphProfileOpenGraph for a profile.

Open Graph

Svelte SEO supports the following Open Graph object types: basic, music, movie, article, book, and profile. For the full specification, please check out http://ogp.me/.

Twitter

Svelte SEO supports all Twitter Card Tags. For more information, check out the Twitter documentation at https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup.

twitter={{
	card: 'summary_large_image',
	site: '@primalmovement',
	title: 'Primal Movement | Natural Movement for Better Health',
	description: 'Learn about primal movement exercises and how they can benefit your fitness.',
	image: 'https://www.primal-movement.com/images/squatting.jpg',
	imageAlt: 'Squatting'
}}

Facebook

facebook={{
	appId: '1234567890'
}}

JSON-LD

JSON-LD provides a more customizable and detailed representation of content in search results. With Svelte SEO, you can implement all available JSON-LD types. Here is a basic example:

jsonLd={{
	'@context': 'https://schema.org',
	'@type': 'WebSite',
	name: 'Primal Movement | Natural Movement for Better Health',
	description: 'Learn about primal movement exercises and how they can benefit your fitness.',
	url: 'https://www.primal-movement.com'
}}

Keywords

FAQs

Package last updated on 13 Nov 2023

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