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 🙏

© 2026 – Pkg Stats / Ryan Hefner

seo-meta

v1.0.1

Published

Professional utility for generating SEO metadata, OpenGraph tags, Twitter cards, and JSON-LD structured data schemas for web applications and developer portfolios.

Downloads

195

Readme

seo-meta

Professional utility for generating SEO metadata, OpenGraph tags, Twitter cards, and JSON-LD structured data schemas for web applications and developer portfolios.

npm version license


Features

  • JSON-LD Person Schema -- Generate Google-compliant Person structured data for portfolios and personal sites.
  • JSON-LD CreativeWork Schema -- Generate structured data for projects, articles, and creative works.
  • Meta Tag Generation -- Standardized OpenGraph and Twitter Card meta tags in one call.
  • Framework Agnostic -- Works with React, Next.js, Vue, Svelte, or plain HTML.
  • Zero Dependencies -- No external packages required.

Installation

npm install seo-meta

Usage

Generating a Person Schema (JSON-LD)

Use this to add structured data about yourself on a portfolio or personal website. Google uses this to display rich results in search.

import { generatePersonSchema } from 'seo-meta';

const schema = generatePersonSchema({
  name: 'John Doe',
  jobTitle: 'Full Stack Developer',
  url: 'https://johndoe.dev',
  sameAs: [
    'https://github.com/johndoe',
    'https://linkedin.com/in/johndoe',
    'https://twitter.com/johndoe'
  ],
  alumniOf: 'MIT'
});

console.log(JSON.stringify(schema, null, 2));

// Output:
// {
//   "@context": "https://schema.org",
//   "@type": "Person",
//   "name": "John Doe",
//   "jobTitle": "Full Stack Developer",
//   "url": "https://johndoe.dev",
//   "sameAs": [
//     "https://github.com/johndoe",
//     "https://linkedin.com/in/johndoe",
//     "https://twitter.com/johndoe"
//   ],
//   "alumniOf": "MIT"
// }

Inject into your HTML:

<script type="application/ld+json">
  <!-- Paste the JSON output here -->
</script>

Generating a Project Schema (JSON-LD)

Use this for individual projects, blog posts, or creative works.

import { generateProjectSchema } from 'seo-meta';

const schema = generateProjectSchema({
  name: 'Weather Dashboard',
  description: 'A real-time weather monitoring application built with React and OpenWeather API.',
  url: 'https://johndoe.dev/projects/weather-dashboard',
  image: 'https://johndoe.dev/images/weather-dashboard.png',
  keywords: ['react', 'weather', 'api', 'dashboard', 'real-time']
});

console.log(JSON.stringify(schema, null, 2));

// Output:
// {
//   "@context": "https://schema.org",
//   "@type": "CreativeWork",
//   "name": "Weather Dashboard",
//   "description": "A real-time weather monitoring application...",
//   "url": "https://johndoe.dev/projects/weather-dashboard",
//   "image": "https://johndoe.dev/images/weather-dashboard.png",
//   "keywords": "react, weather, api, dashboard, real-time"
// }

Generating Meta Tags

Generate a complete set of OpenGraph and Twitter Card meta tags for any page.

import { getMetaTags } from 'seo-meta';

const tags = getMetaTags({
  title: 'John Doe | Full Stack Developer Portfolio',
  description: 'Building exceptional digital experiences with React, Node.js, and cloud technologies.',
  image: 'https://johndoe.dev/og-image.jpg',
  url: 'https://johndoe.dev',
  twitterHandle: '@johndoe'
});

console.log(tags);

// Output:
// [
//   { name: 'title', content: 'John Doe | Full Stack Developer Portfolio' },
//   { name: 'description', content: 'Building exceptional digital experiences...' },
//   { property: 'og:type', content: 'website' },
//   { property: 'og:url', content: 'https://johndoe.dev' },
//   { property: 'og:title', content: 'John Doe | Full Stack Developer Portfolio' },
//   { property: 'og:description', content: 'Building exceptional digital experiences...' },
//   { property: 'og:image', content: 'https://johndoe.dev/og-image.jpg' },
//   { name: 'twitter:card', content: 'summary_large_image' },
//   { name: 'twitter:site', content: '@johndoe' },
//   { name: 'twitter:title', content: 'John Doe | Full Stack Developer Portfolio' },
//   { name: 'twitter:description', content: 'Building exceptional digital experiences...' },
//   { name: 'twitter:image', content: 'https://johndoe.dev/og-image.jpg' }
// ]

Using with React (Helmet or Next.js)

import { Helmet } from 'react-helmet';
import { getMetaTags } from 'seo-meta';

function SEOHead() {
  const tags = getMetaTags({
    title: 'My Portfolio',
    description: 'A showcase of my best work.',
    image: '/og.jpg',
    url: 'https://mysite.com'
  });

  return (
    <Helmet>
      <title>{tags[0].content}</title>
      {tags.map((tag, i) => (
        tag.property
          ? <meta key={i} property={tag.property} content={tag.content} />
          : <meta key={i} name={tag.name} content={tag.content} />
      ))}
    </Helmet>
  );
}

Using with Plain HTML

import { getMetaTags } from 'seo-meta';

const tags = getMetaTags({ title: 'My Site', description: 'Welcome', image: '/og.jpg', url: '/' });

tags.forEach(tag => {
  const meta = document.createElement('meta');
  if (tag.property) meta.setAttribute('property', tag.property);
  if (tag.name) meta.setAttribute('name', tag.name);
  meta.setAttribute('content', tag.content);
  document.head.appendChild(meta);
});

API Reference

| Function | Parameters | Returns | Description | | --- | --- | --- | --- | | generatePersonSchema(opts) | name, jobTitle, url, sameAs[], alumniOf | Object | Creates a JSON-LD Person schema | | generateProjectSchema(opts) | name, description, url, image, keywords[] | Object | Creates a JSON-LD CreativeWork schema | | getMetaTags(opts) | title, description, image, url, twitterHandle | Array<Object> | Generates OpenGraph and Twitter meta tags |


License

MIT -- see LICENSE for details.