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

girk-sdk

v1.28.0

Published

Girk SDK — build static sites from in-memory data

Readme

girk-sdk

Build static sites from in-memory data. Zero filesystem access.

Part of the Girk static site generator.

Install

npm install girk-sdk

Usage

import { build } from "girk-sdk";

const result = await build({
  files: [
    { path: "/index.md", content: "# Hello world\nWelcome to my site." },
    { path: "/about.md", content: "# About\nSome about text." },
    { path: "/blog/post:nl.md", content: "# Blogpost\nDit is een blogpost." },
  ],
  media: [
    { path: "/media/photo.jpg", content: imageBuffer, contentType: "image/jpeg" },
  ],
  config: {
    projectTitle: "My Site",
  },
  languages: ["en", "nl"],
});

// result.files — array of generated files (HTML, CSS, JSON, etc.)
// result.pages — array of page metadata
// result.project — resolved project config
// result.languages — detected or provided languages

Input

build() takes a GirkBuildInput object:

| Field | Type | Required | Description | |-------|------|----------|-------------| | files | GirkInputFile[] | yes | Markdown files with path and content | | media | GirkInputAsset[] | no | Media assets — passed through as-is | | assets | GirkInputAsset[] | no | Static assets — passed through as-is | | config | object | no | Project configuration | | languages | string[] | no | Explicit languages; auto-detected from filenames if omitted |

Output

build() returns a GirkBuildResult:

{
  files: GirkOutputFile[];     // all generated files
  pages: GirkOutputPage[];     // page metadata (title, path, language)
  project: Project;            // resolved project config
  languages: string[];         // detected languages
}

Each GirkOutputFile has path, content, and contentType.

What it does

  • Markdown to HTML rendering with syntax highlighting
  • Route generation from file paths
  • Language detection from filenames (page:nl.md)
  • Menu, tags, archives, socials generation
  • Page rendering via EJS templates (in-memory, no filesystem)
  • CSS generation with configurable color system
  • Search index generation
  • Robots.txt generation
  • Media passthrough (no processing)

What it does NOT do

  • Read or write files to disk
  • Image processing or thumbnail generation
  • Fetch remote data sources
  • CLI logging or terminal output
  • Scan directories

Languages

Languages are detected from filename suffixes (page:nl.md) or passed explicitly via languages: ["en", "nl"].

License

MIT