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

leafdocs

v0.1.0

Published

Markdown → HTML static docs site generator with Vite plugin

Downloads

206

Readme

Leafdocs 🍃

Beautiful, functional documentation from plain Markdown — no configuration required.

Leafdocs is designed to be as simple as possible: add a folder, drop in numbered Markdown files, get a polished documentation site. Convention over configuration throughout. Fully themable with Tailwind CSS.

✨ Features

  • 📁 Convention over config — numbered files become ordered pages; folder structure becomes the section nav; no routes to declare
  • 🔍 Full-text searchPagefind built in and pre-configured, works out of the box
  • 📄 OpenAPI viewer — drop YAML/JSON specs in openapi/ and get a Scalar reference tab, automatically
  • 🎨 Fully themable — built on Tailwind CSS; override design tokens and bring your own styles with no friction

Quick start

Scaffold a new site in seconds:

npx leafdocs init               # scaffold in current directory
npx leafdocs init ./my-docs     # scaffold in a subdirectory

Then install dependencies and start the dev server:

npm install
npm run dev     # dev server → http://localhost:3000
npm run build   # production build → dist-prod/

The dev server watches for changes, new files, and deletions — the browser reloads automatically.

Directory structure

Leafdocs maps your folder structure directly to site sections. Each subfolder of pages/ becomes a section; files within are ordered by their numeric prefix.

docs/
  pages/
    header.md               # site title + ordered section list
    index.md                # home page
    footer.md               # optional footer shown on all pages
    getting-started/
      01-intro.md           # → /getting-started/intro.html
      02-installation.md
    api-reference/
      01-overview.md
  css/
    custom.css              # Tailwind + custom styles
  assets/                   # images, logo (logo.svg/png/webp auto-detected)
  openapi/                  # YAML/JSON specs → automatic API viewer tab
  vite.config.js
  package.json

Vite plugin

Wrap your Vite config with leafdocs(). It handles everything: building pages, running Pagefind, serving the dev server, and watching for changes.

// vite.config.js
import leafdocs from 'leafdocs/vite'
import tailwindcss from '@tailwindcss/vite'

export default leafdocs({
  plugins: [tailwindcss()],
})

header.md — site title and sections

header.md defines the site title (via frontmatter) and the top-level navigation sections (via Markdown links). Each link slug maps to a subdirectory in pages/.

---
title: My Docs
---

[Getting Started](getting-started)
[API Reference](api-reference)

Link order = nav order.

footer.md — site footer

Optional. Create pages/footer.md and its content will appear at the bottom of every page. Supports Markdown — links, copyright notices, etc.

© 2026 My Company. [Privacy Policy](https://example.com/privacy)

Page frontmatter

Each page can declare a title via frontmatter. It is used in the sidebar, browser <title>, and Pagefind search index.

---
title: Page Title
---

Theming

Leafdocs uses Tailwind CSS v4. Override the design tokens in your CSS file to match your brand:

@import "tailwindcss";

@theme {
  --color-primary: #6366f1;   /* accent color */
  --font-sans: 'Your Font', sans-serif;
}

All colors, spacing, and typography are driven by these tokens — no magic strings.

License

MIT