Socket
Socket
Sign inDemoInstall

svead

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svead

Svead, a component that allows you to set head meta information, canonical, title, Twitter and Facebook Open Graph tags.


Version published
Weekly downloads
340
decreased by-27.04%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 title
  • description => page description
  • url => Full URL of the current page

Optional props

  • authorName => Author Name
  • image => Open Graph image for use in Twitter, Facebook, etc.
  • paymentPointer => Web Monetisation Payment pointer
  • website => 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:

# package with sveltkit
pnpm run package
# install local package
pnpm i -D ./package
# orr use the script
pnpm package:local

Keywords

FAQs

Last updated on 06 Dec 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc