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

sauerkraut

v0.9.1

Published

My SSG, SSR & CMS solution.

Readme

Sauerkraut

My tool for building websites. See philosophy for details.

Plans

  • do not rewrite mathematics/mathematics.cards.json to index.html
  • file.cards.json should generate file-cards.html
  • Autogenerate index.html?
  • "Daily/", etc. categories?
  • Blog RSS feed and fix tags/categories in dev server
  • later: Linter to always ensure trailing slash for local URLs
  • later: for each page autogenerate: references, backreferences, other meatdata, tags, etc.
  • Some interactive apps should have a "freeze" button. to save output, like from a command line. SSR or render caches this, and anything with side-effects cannot be ran unless unfrozen
  • don't run mermaid on client (https://github.com/mermaid-js/mermaid/issues/3650)

Introduction

Philosophy

Sauerkraut is my tool for building websites. It:

  • Avoids using popular meta-frameworks like Next.js and Astro
    • To detatch from JavaScript framework boom-bust cycles
  • Uses libraries that solve general problems with a focused, composable, small solution
    • When libraries are inevitably superseded, replacing them should take minutes
    • For example, when serving minature apps, I use esbuild & "manually" do SSR instead of using a Vite-based framework
    • For example, when serving content, I "AOT" bundle necessary libraries with Rollup and use them within <script type="module"> tags
  • Integrates with popular tools like KaTeX and Mermaid

Usage

In a new directory,

pnpm init
pnpm install sauerkraut
mkdir -p ./content
printf '%s\n' '# Hello, World!' > ./content/index.md
./node_modules/.bin/sauerkraut

Summary

Sauerkraut is a static site generator. Conventionally, it recursively reads input files from content/. Then, it processes each file path and content. Finally, it writes the result path and content to build/.

Content Files

Content files are any files located in the content directory that aren't special files.

Transformations are done by default to file paths in two cases:

  1. If a file ends with .md (or similar) files, it is converted into a .html file.
  • /mathematics.md -> /mathematics.html
  • /index.md -> /index.html
  1. If a file name (excluding file extensions) is the same as the directory name of it's parent directory, then that file is renamed to index.html.
  • /about/about.md -> /about/index.html

This makes it easier to edit files in IDEs (unlike Next.js's page.js).

Supported Formats

The following formats are supported:

JSX

These files are processed with esbuild. Typically, they use Nano JSX.

HTML

These files are automatically given the proper HTML boilerplate.

Markdown

These files are processed with the markdown parser markdown-it.

Markdown files support the following features:

Special File Names

Special files modify behavior and are not processed. They include:

  • *.sk.js

Described further in JavaScript Customization

Ignored files are ignored. They include:

  • _*/
  • *_/
  • .git/
  • .obsidian/
  • node_modules/

Website JavaScript Customization

This file potentially customizes the behavior of the whole website. To be recognized, its name must match /sk.config.js.

It can export:

  • title
  • rootDir
  • contentDir
  • staticDir
  • outputDir
  • transformUri()
  • validateFrontmatter()
  • createHtml()

Page JavaScript Customization

This file potentially customizes the behavior of a single page. To be recognized, its name must match /**/<adjacentPage>.sk.js.

It can export:

  • Meta()
  • Head()
  • GenerateSlugMapping()
  • GenerateTemplateVariables()

Directory Structure

build/

Where output files are written to.

content/

These files are processed and written to the build directory.

static/

These files are copied directly to the build directory without processing.

Older Ideas

Entrypoints. Entrypoints were created to make it easier to approximate tracking dependencies of a page. For example, if /math/theme.cls changed, then probably /math/slides.tex should be regenerated as well. This breaks down too often, as it's not uncommon for files under a particular directory to be unrelated. An alternative to entrypoints was tracking dependencies of a page by parsing the page with either regular expressions or a laguage parser library. This wasn't chosen since it would mean adding regular expressions or traverse functions for each markup language. And, detection would not be posssible with more dynamic markup languages.