0.0.4 • Published 8 months ago

svead v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Svead - Svelte Head Component

All Contributors

MadeWithSvelte.com shield

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

svead

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} />

Packaging for NPM

Scott, this is here for you to remember how to do this 🙃

Although I detailed this in Making npm Packages with SvelteKit I think it's best to put it here as I always come to the README and the instructions are never there! 😅

Publish the project to NPM

# authenticate with npm
npm login
# bump version with npm
npm version 0.0.8
# package with sveltekit
pnpm run package
# publish
npm publish
# push tags to github
git push --tags

Publish @next package

Same procedure except use the --tag flag:

# authenticate with npm
npm login
# bump version with npm
npm version 0.0.13
# package with sveltekit
pnpm run package
# publish with tag
npm publish --tag next
# push tags to github
git push --tags

Move @next package to latest

# authenticate with npm
npm login
# move @next to latest
npm dist-tag add sveltekit-embed@0.0.13 latest

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

0.0.9

8 months ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago