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

@sandlada/astro-page-meta

v0.0.1-20260822.b

Published

Astro component for emitting SEO, Open Graph, and Twitter page meta tags.

Readme

@sandlada/astro-page-meta

npm version GitHub License

For Private Use.

A powerful, type-safe Astro component for managing SEO, Open Graph Protocol (OGP), and Twitter Cards metadata in the HTML <head>.


Features

  • 🎯 Single Component Architecture: Unified <PageMeta /> component covers standard SEO, Open Graph, and Twitter Cards.
  • 🌐 Strict Open Graph (OGP) Compliance: Proper nested structured meta tags (video:actor + video:actor:role, music:album + music:album:disc/track, etc.).
  • 🔗 Automatic Absolute URL Resolution: Automatically converts relative image/media/canonical URLs to absolute URLs using Astro.site / Astro.url.
  • 🖼️ Astro Image Support: Accepts Astro ImageMetadata or URL strings for image, icon, ogImage, and twitterImage.
  • 🏷️ Dynamic MIME Type Resolution: Detects .svg, .ico, .png, .webp, .jpg for favicons dynamically.
  • 🐦 Twitter Cards Support: summary, summary_large_image, player, and app card types.
  • 🔒 Type-Safe: Full TypeScript interfaces exported for props and metadata payloads.

Installation

npm install @sandlada/astro-page-meta

Usage

1. Basic Website Metadata

---
import { PageMeta } from '@sandlada/astro-page-meta';
import heroImage from '../assets/hero.png';
import favicon from '../assets/favicon.svg';
---

<!doctype html>
<html lang="en">
    <head>
        <PageMeta
            title="My Awesome Website"
            description="Welcome to my awesome website built with Astro."
            url="https://example.com/"
            icon={favicon}
            image={heroImage}
            imageAlt="Website hero preview"
            twitterSite="@example"
        />
    </head>
    <body>
        <h1>Hello World</h1>
    </body>
</html>

2. Article (Open Graph article)

---
import { PageMeta } from '@sandlada/astro-page-meta';
---

<head>
    <PageMeta
        title="Understanding Open Graph Meta Tags"
        description="A deep dive into constructing perfect social metadata."
        ogType="article"
        ogArticlePublishedTime="2026-08-22T00:00:00Z"
        ogArticleModifiedTime="2026-08-22T12:00:00Z"
        ogArticleAuthor={['https://github.com/author1']}
        ogArticleSection="Web Development"
        ogArticleTag={['Astro', 'SEO', 'Open Graph']}
        twitterCard="summary_large_image"
        twitterLabel1="Written by"
        twitterData1="Kai Orion"
        twitterLabel2="Reading time"
        twitterData2="5 min"
    />
</head>

3. Video (Open Graph video.movie / video.episode)

---
import { PageMeta } from '@sandlada/astro-page-meta';
---

<head>
    <PageMeta
        title="Big Buck Bunny (2008)"
        description="An open-source animated short film by the Blender Foundation."
        ogType="video.movie"
        ogVideo="https://example.com/video.mp4"
        ogVideoDuration={596}
        ogVideoReleaseDate="2008-04-10"
        ogVideoActor={[
            { actor: 'https://example.com/actor1', role: 'Bunny' },
            { actor: 'https://example.com/actor2', role: 'Squirrel' },
        ]}
        ogVideoDirector={['https://example.com/director']}
    />
</head>

4. Twitter Player Card

---
import { PageMeta } from '@sandlada/astro-page-meta';
---

<head>
    <PageMeta
        title="Video Player Demo"
        description="Watch this video embedded via Twitter Player Card."
        twitterCard="player"
        twitterPlayer="https://example.com/player.html"
        twitterPlayerWidth={1280}
        twitterPlayerHeight={720}
        twitterPlayerStream="https://example.com/video.webm"
        twitterPlayerStreamContentType="video/webm"
    />
</head>

TypeScript Types

All types can be imported directly from the package:

import type {
    IPageMeta,
    IOpenGraph,
    ITwitterCard,
    PageMetaImage,
    PageMetaIcon
} from '@sandlada/astro-page-meta';

License

MIT