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

@geastack/html-renderer

v0.0.3

Published

Render local HTML and CSS with the native GeaStack renderer

Readme

Gea HTML Renderer

Render local HTML and CSS to PNG with GeaStack's native renderer. The Node client keeps a native worker open for repeated captures.

HTML to PNG in 14 ms

This card was generated by html-renderer from fixtures/promo/promo.html and promo.css:

npm run render -- fixtures/promo/promo.html --width 1200 --height 630 --out fixtures/promo/promo.png

Install and render

Install the npm package with Node.js 20.19 or later and render a local HTML file to PNG.

npm install @geastack/html-renderer
npx gea-html-render page.html --out page.png

The npm install hook downloads the matching native renderer from GitHub Releases. If npm skips dependency scripts, the first render downloads it. The CLI defaults to 1920 × 1080 at DPR 1. Override the viewport with --width, --height, and --dpr.

The release workflow builds for Apple Silicon macOS, Linux x64, and Windows x64. Linux builds use the Ubuntu 24.04 runtime and need SDL2, libcurl, FreeType, and libpng shared libraries. Headless capture does not require a display server.

Node API

import { openRenderer } from '@geastack/html-renderer'

const renderer = openRenderer()
try {
  await renderer.capture({ input: 'page.html', out: 'page.png', width: 1920, height: 1080 })
} finally {
  await renderer.close()
}

Calls to capture() run in order. A failed capture rejects its promise and the worker can handle the next request. Each capture reloads the document by default. Set reusePage: true to capture the already mounted page again when the input path, viewport, and DPR match.

Supported input

The loader handles explicitly closed elements, void elements, text, common named entities, local images, inline styles, style blocks, linked stylesheets, and single-source local @font-face rules. HTML assets resolve relative to the HTML file. Font paths resolve relative to their stylesheet. Rendering uses Gea's selector, property, layout, and paint support. The prototype does not execute page JavaScript, fetch remote assets, implement browser HTML error recovery, or handle nested CSS at-rules.

Fixtures

fixtures/ holds 27 examples, from a one-line card to share cards, event badges, a campaign in 6 languages and 4 sizes, sale cards and blog covers. Most are templates that render one image per entry in their data. See fixtures/README.md for how to render them.

All fixtures

This gallery is also generated by html-renderer, with fixtures/shared/gallery.mjs.

License

Apache-2.0. The fixture fonts are covered by their separate SIL Open Font Licenses. See LICENSE and NOTICE.