npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

svelte-meta-data

v0.0.2

Published

A Svelte Component for handling SEO metadata & other relavent metadata

Downloads

4

Readme

svelte-meta-data

svelte-meta-data is a svelte component used to manage all relevant meta data related to your website. This component was made to emulate the blog_info method from WordPress so you can access site meta data throughout your app with ease. This component also automates the creation of meta tags for SEO purposes. Simply pass an object containing all site & SEO meta data to the component via props and voila!

⚠️ This component is still in development and is not yet stable for production. ⚠️

Getting Started

  npm i svelte-meta-data

Simple example with basic site meta data

<script>
  import SiteInfo from 'svelte-meta-data';

  const site_info = {
    site_url: "https://example.com",
    site_author: "Author Name",
    site_index: "/index",
  };
</script>

<SiteInfo {site_info}/>

more examples to come

Current Features include...

  • [x] Global writable store to referance site meta data anywhere in your app 🌐
  • [x] Automated creation of meta tags for SEO 🔎

Roadmap 🚗...

  • [ ] Add ability to create page specific seo info similar to svelte-seo
  • [ ] Convert to TypeScript

Properties List

pass an object named "meta_data" to the component via props with any of the following key/value pairs. All data is optional

| 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.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 | array | An array of images (object) to be used as a preview. If multiple supplied you can choose one when sharing.| | 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.