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

pilcrow-eleventy

v0.1.0

Published

Eleventy plugin that typesets your posts with Pilcrow at build time. Drop caps, sidenote-aware spans, hyphenation, per-line wrappers — same engine as pilcrow.page. Built on @chenglou/pretext.

Readme

pilcrow-eleventy ¶

An Eleventy plugin for setting your posts the way a competent print designer would, without leaving Markdown.

The line-breaking primitive underneath is pretext by @chenglou. pilcrow-eleventy is the adapter on top: it hooks into Eleventy's transform pipeline, hands each rendered HTML page to the same engine that powers pilcrow.page, and writes the typeset HTML back to disk. The editorial behaviour (drop caps, sidenote-aware spans, en-gb hyphenation, an orphan guard) is whatever the engine has shipped at the version you install.

What it does

Once registered, the plugin opens a single headless Chromium for your build, then hooks an addTransform step that fires per output page. Every page that contains a <div class="post-body"> wrapper has the inner paragraphs replaced by per-line <span class="pt-line"> elements. Pages without the wrapper pass through untouched, which means you can opt content in one layout at a time. Chromium closes when the build finishes.

No runtime JavaScript ships to the reader. The work happens once, at build time.

Install

npm install --save-dev pilcrow-eleventy
npx playwright install chromium

Playwright is a peer dependency; the Chromium download is roughly 170 MB on first install.

Minimal config

eleventy.config.mjs:

import pilcrowEleventy from 'pilcrow-eleventy';

export default function (eleventyConfig) {
  eleventyConfig.addPlugin(pilcrowEleventy);

  return {
    dir: { input: 'src', output: '_site' },
  };
}

Then in your post layout, wrap the content in the class the plugin keys on:

<article>
  <h1>{{ title }}</h1>
  <div class="post-body">
    {{ content | safe }}
  </div>
</article>

That wrapper is the contract. Pages without it are passed through untouched.

Options

The plugin forwards options straight through to the engine. The interesting one is dropCap; the others control measurement geometry and almost never need to be set. Leave them at their defaults and the renderer will pick up font, column width, and leading from the page's own CSS.

eleventyConfig.addPlugin(pilcrowEleventy, {
  dropCap: true, // false to disable the lede drop cap globally
});

For per-post opt-out without changing the global default, drop a <meta name="pilcrow:drop-cap" content="false"> tag in the page head. Useful when the lede is a quotation or a list-introduction rather than running prose.

Build environment requirements

The engine measures text by laying it out inside headless Chromium. Your build host therefore needs to be able to install and launch Playwright Chromium. The following hosts are confirmed working:

  • Vercel
  • Netlify
  • Cloudflare Pages
  • GitHub Actions
  • GitLab CI

Locked-down CI environments without sandboxing or browser binaries are not supported. Build times scale with post count plus a fixed Chromium spin-up cost.

Node 18.17.1 or newer. Playwright 1.40 or newer (peer dependency). Eleventy 3.0 or newer (peer dependency); the plugin uses the eleventy.before and eleventy.after events for renderer lifecycle.

Documentation

The Pilcrow project lives at pilcrow.page. Engine-level options, the full TypesetOptions reference, and the Astro starter are documented there.

Credit

Cheng Lou wrote pretext. pilcrow-eleventy is a thin adapter that runs the engine inside an Eleventy build; the typography itself is mostly someone else's work, exposed through a more convenient seam.

Licence

MIT.


Built on pretext by @chenglou.