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

@growth-labs/opengraph

v0.2.0

Published

Generates branded Open Graph images using Cloudflare Browser Rendering (Puppeteer). Screenshots HTML templates, caches in R2, serves via on-demand route. Two sizes per page: 1200×630 (Facebook/LinkedIn/Twitter) and 1200×675 (Google Discover 16:9).

Readme

@growth-labs/opengraph

Generates branded Open Graph images using Cloudflare Browser Rendering (Puppeteer). Screenshots HTML templates, caches in R2, serves via on-demand route. Two sizes per page: 1200×630 (Facebook/LinkedIn/Twitter) and 1200×675 (Google Discover 16:9).

Requires: Cloudflare Workers Paid plan (Browser Rendering access).

Config

import opengraph from '@growth-labs/opengraph'

opengraph({
  publicDomain: 'media.fedweek.com',            // R2 custom domain
  r2Binding: 'MEDIA_BUCKET',
  browserBinding: 'BROWSER',
  brandName: 'FEDweek',
  brandColors: {
    primary: '#1a365d',
    accent: '#e53e3e',
    text: '#ffffff',
  },
  logoUrl: 'https://media.fedweek.com/logos/og-logo.png',
  fontFamily: 'Inter',
  fontWeight: '600',
  route: { enabled: true, regenerateSecret: '...' },
  format: 'png',
  timeout: 10_000,
})

What It Injects

Route: GET /og/[...path].png — on-demand OG image generation. First request renders via Browser Rendering + caches to R2. Subsequent requests served from R2.

Standalone Utilities

import { getOgImageUrl, getOgDiscoverUrl } from '@growth-labs/opengraph/utils'
import { generateOgImage } from '@growth-labs/opengraph/utils'

getOgImageUrl('media.fedweek.com', '/news/my-article')
// → https://media.fedweek.com/og/news/my-article.png

// Or generate programmatically (e.g. in publish workflow)
await generateOgImage(env.BROWSER, env.MEDIA_BUCKET, templateData, options)

Custom Templates

Override the built-in template with a function that returns HTML:

opengraph({
  template: (data) => `<html><body><h1>${data.title}</h1></body></html>`,
})

Template receives: { title, subtitle, description, category, authorName, authorImageUrl, pageType }

Wrangler Bindings

[browser]
binding = "BROWSER"

[[r2_buckets]]
binding = "MEDIA_BUCKET"
bucket_name = "fedweek-public-media"

compatibility_flags = ["nodejs_compat"]

Integration Points

  • With @growth-labs/seo: Consumer passes OG image URL into generateMeta(). No direct import between packages.
  • With @growth-labs/media: Writes to og/ prefix in the same R2 bucket. ogKey() in media utils generates matching keys.

Key Patterns

  • Virtual module: virtual:growth-labs/opengraph/config
  • R2 key convention: og/{page-path}.png (aligns with @growth-labs/media/utils ogKey())
  • ?regenerate=true with shared secret to force re-render
  • Browser Rendering has per-account concurrency limits — timeout protects against hangs