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

@haverstack/eleventy

v0.3.0

Published

Eleventy plugin that builds a static site from a Haverstack stack — records are the content source, no content files on disk

Readme

@haverstack/eleventy

An Eleventy plugin that builds a static site from a Haverstack stack. Records are the content source; there are no content files on disk.

Status: Early development, but the whole pipeline works — load, resolve, asset staging, markdown, emit (pages, collections, feeds, sitemap), built-in templates that a site can override with its own, and the check / publish commands. docs/design.md covers how it works and why.

Usage

import { haverstack } from '@haverstack/eleventy';
import { LocalAdapter } from '@haverstack/adapter-local';
import { Stack } from '@haverstack/core';

export default async function (eleventyConfig) {
  const stack = await Stack.create(await LocalAdapter.open({ path: './stack.db' }));

  eleventyConfig.addPlugin(haverstack, {
    stack,
    site: 'personal',
    assetDir: '_stack-assets',
    slugStrategy: 'title',
  });
}

The plugin takes a Stack, not a URL — so a build can run against a remote server (APIAdapter), a local SQLite file (LocalAdapter), or an in-memory stack (MemoryAdapter, for tests). Whoever constructs the stack has already dealt with auth; the plugin never handles credentials and never writes.

Out of the box it renders a legible site with its built-in templates. The pages are ordinary Eleventy pages: transforms and global data apply, and every listed page/member carries tags (haverstack, its type, its tag associations) and eleventyNavigation, so collections.*, navigation plugins, and anything reading collections.all see them.

To use your own layouts, map template names to files in your _includes:

eleventyConfig.addPlugin(haverstack, {
  stack,
  site: 'personal',
  templates: { base: 'layouts/base', listing: 'layouts/index', article: 'layouts/longform' },
});

A mapped page emits its content fragment ({{ content }}) plus record, meta, url, canonical, body / bodyRaw, collection, and the haverstack globals; the layout does the rest and may chain to another. base catches any unmapped name; anything still unmapped keeps the built-in render. haverstack-eleventy eject writes a starter haverstack-base.njk to get going. Other options: eleventyCollections: false for full isolation, pageData: (ctx) => ({…}) to compute extra template data per record.

Types

Consumes the commons publishing types — site@1, page@1, article@1, post@1, photo@1, bookmark@1 — plus _entity@1 and _attachment@1.

Owns two sidecar types, minted under org.haverstack.eleventy:

| Type | Role | | ------------------------------------- | ----------------------------------------------------------------------------------------------------- | | org.haverstack.eleventy/page-meta@1 | Per-record, per-site overrides: slug, template, order, hidden, draft. Every field optional. | | org.haverstack.eleventy/menu@1 | A named, ordered navigation menu belonging to one site. |

defineEleventyTypes(stack) registers the whole set. It is idempotent and safe to call on every build; under a non-owner credential it tolerates types that already exist.

Commands

haverstack-eleventy check     load + resolve, report structural problems, write nothing
haverstack-eleventy publish   stamp article.url / post.url with the canonical location
haverstack-eleventy eject     write a starter haverstack-base layout into _includes

check and publish read the stack from a config module (--config, default ./haverstack.config.mjs) that default-exports a Stack, a { stack, site? }, or a function returning one — the same place a project builds the stack for eleventy.config.js. --site <handle> overrides the config's site.

check is read-only and safe against production data; it exits non-zero when it finds a build failure (a path collision, conflicting sidecars). publish writes — run it deliberately after a good build; --dry-run shows what it would stamp.

License

MIT