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

@rgglez/astro-seo

v0.1.2

Published

Astro component for SEO meta tags, Open Graph, Twitter cards, hreflang links, robots directives, and JSON-LD.

Downloads

96

Readme

astro-seo

License: MIT GitHub all releases GitHub issues GitHub commit activity GitHub stars GitHub forks

astro-seo is a component for centralizing SEO headers: title, description, canonical URL, robots directives, language alternates, Open Graph, Twitter Cards, Facebook App ID, and JSON-LD structured data.

It was inspired by @rgglez/svelte-seo.

Installation

npm install @rgglez/astro-seo
pnpm add @rgglez/astro-seo

Basic Usage

Import the component in an Astro layout and render it inside <head>.

---
import Seo from "@rgglez/astro-seo";
---

<html lang="en">
  <head>
    <Seo
      title="Simple page title"
      description="Simple description about a page"
      canonical="https://example.com/simple-page"
    />
  </head>
  <body>
    <slot />
  </body>
</html>

Advanced Usage

---
import Seo from "@rgglez/astro-seo";

const title = "Primal Movement | Natural Movement for Better Health";
const description =
  "Learn about primal movement exercises and how they can benefit your fitness.";
---

<Seo
  {title}
  {description}
  canonical="https://www.primal-movement.com/"
  keywords={[
    "primal movement",
    "natural movement",
    "fitness",
  ]}
  languageAlternates={[
    { hreflang: "en", href: "https://www.primal-movement.com/" },
    { hreflang: "es", href: "https://www.primal-movement.com/es/" },
  ]}
  openGraph={{
    title,
    description,
    url: "https://www.primal-movement.com/",
    type: "website",
    siteName: "Primal Movement",
    images: [
      {
        url: "https://www.primal-movement.com/images/squatting.jpg",
        width: 1200,
        height: 630,
        alt: "Squatting",
      },
    ],
  }}
  twitter={{
    card: "summary_large_image",
    title,
    description,
    image: "https://www.primal-movement.com/images/squatting.jpg",
  }}
  jsonLd={{
    "@type": "WebSite",
    name: "Primal Movement",
    description,
    url: "https://www.primal-movement.com/",
  }}
/>

JSON-LD Graphs

jsonLd accepts either one object or an array. Arrays are rendered as a Schema.org @graph.

<Seo
  jsonLd={[
    {
      "@type": "BlogPosting",
      "@id": "https://example.com/glossary#article",
      headline: "Glossary",
    },
    {
      "@type": "DefinedTermSet",
      "@id": "https://example.com/glossary#defined-term-set",
      name: "Glossary",
    },
  ]}
/>

Props

| Property | Type | Description | |---|---|---| | title | string | Page title, rendered as <title>. Combined with titleTemplate if both are set (%s replaced by title). | | titleTemplate | string | Pattern such as "%s \| My Site". Applied when title is present. | | defaultTitle | string | Fallback title when title is absent. | | description | string | <meta name="description">. Page summary for search snippets. | | keywords | string \| string[] | <meta name="keywords">. Array is joined with , . | | canonical | string \| URL | <link rel="canonical">. Preferred URL to avoid duplicate content. | | amp | string \| URL | <link rel="amphtml">. Points to the AMP version of the page. | | manifest | string \| URL | <link rel="manifest">. Path to the Web App Manifest (PWA). | | base | string | <base href>. Base URL for all relative links on the page. | | languageAlternates | LanguageAlternate[] | Emits <link rel="alternate" hreflang> per entry. Each item is { hreflang, href }. | | robots | string | Raw <meta name="robots"> content (e.g. "index,follow"). Overrides noindex/nofollow when set. | | googlebot | string | <meta name="googlebot"> content. Defaults to the same value as robots. | | noindex | boolean | Sets noindex in the robots meta (unless robots string overrides). | | nofollow | boolean | Sets nofollow in the robots meta. | | nositelinkssearchbox | boolean | Emits <meta name="google" content="nositelinkssearchbox"> to suppress Google's sitelinks search box. | | notranslate | boolean | Emits <meta name="google" content="notranslate"> to suppress auto-translation. | | themeColor | string | <meta name="theme-color">. Browser UI accent color (mobile/PWA). | | applicationName | string | <meta name="application-name">. App name for browser/OS display. | | openGraph | OpenGraph | Emits og:* meta tags. Supports title, type, url, description, images, videos, locale, siteName, and sub-objects article, book, profile, music, movie. | | twitter | TwitterCard | Emits twitter:* meta tags. Supports card, title, description, image, site, creator, and app/player fields. | | facebook | Facebook | Object with appId. Emits <meta property="fb:app_id">. | | jsonLd | JsonLd | Single object or array. Emits <script type="application/ld+json">. Array is wrapped in a Schema.org @graph. @context auto-added if absent. | | additionalMetaTags | AdditionalMetaTag[] | Extra <meta> tags. Each item accepts name?, property?, httpEquiv?, content. | | additionalLinkTags | AdditionalLinkTag[] | Extra <link> tags. Each item accepts rel, href, and optional hreflang, type, sizes, media, as, crossorigin. |

Types available from @rgglez/astro-seo/types.

License

Copyright (c) 2026 Rodolfo González González.

Published under the MIT license. Please read the LICENSE file.