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

@s-blog/engine

v0.3.12

Published

Rust-powered data engine for s-blog — Markdown parsing, image processing, SEO/feed generation

Readme

@s-blog/engine

Rust-powered build engine for S-Blog — handles Markdown parsing, image processing, SEO/feed generation, and development server with native performance.

Install

npm install @s-blog/engine

The correct native binary for your platform is installed automatically.

Supported Platforms

| OS | Arch | Package | |---------|-------|----------------------------------| | Windows | x64 | @s-blog/engine-win32-x64-msvc | | macOS | ARM64 | @s-blog/engine-darwin-arm64 | | Linux | x64 | @s-blog/engine-linux-x64-gnu |

macOS Intel users: the ARM64 binary runs seamlessly via Rosetta 2.

CLI

The package registers an s-blog binary. In a user project, this is invoked via npm scripts:

{
  "scripts": {
    "dev": "s-blog serve",
    "build": "s-blog build"
  }
}

s-blog build

Runs the full production build pipeline:

  1. Copies the pre-built App Shell from @s-blog/core
  2. Generates posts manifest and copies Markdown files
  3. Processes album photos (WebP thumbnails + EXIF extraction)
  4. Generates SEO pages, sitemap.xml, rss.xml, robots.txt
  5. Copies static assets from public/
s-blog build [--output <dir>]

Options:
  --output <dir>  Output directory (default: dist)

s-blog serve

Starts a development server with live content rebuilding:

s-blog serve [--port <number>]

Options:
  --port <number>  Port to listen on (default: 3000)

Node.js API

For programmatic use (e.g., custom build scripts):

const {
  generatePostsData,
  generatePostsManifestOnly,
  generateAlbumsData,
  generateSeoPages,
  generateSitemap,
  generateRss,
  generateRobots,
  buildCommand,
  serveCommand,
} = require('@s-blog/engine')

generatePostsData(postsDir, outputDir, configJson) → string

Scans postsDir for Markdown files, parses frontmatter, generates manifest.json, and copies .md files to outputDir/posts/. Returns the manifest as a JSON string.

generatePostsManifestOnly(postsDir, outputDir, configJson) → string

Same as generatePostsData but skips copying Markdown files. Used in dev mode where files are served directly from source.

generateAlbumsData(albumsDir, outputDir, albumConfigJson, siteConfigJson) → string

Generates album index and per-album detail JSON files, including WebP thumbnail generation and EXIF extraction. Returns the albums-index JSON string.

generateSeoPages(manifestJson, templatePath, outputDir, configJson) → number

Generates an SEO-optimized HTML page for each post (Open Graph, Twitter Card, JSON-LD). Returns the number of pages generated.

generateSitemap(manifestJson, outputPath, configJson) → void

Generates sitemap.xml conforming to the Sitemaps protocol.

generateRss(manifestJson, outputPath, configJson) → void

Generates rss.xml conforming to RSS 2.0.

generateRobots(outputPath, configJson) → void

Generates robots.txt with sitemap reference.

buildCommand(optionsJson) → string

Executes the full production build pipeline. Accepts { "outputDir": "dist" }. Returns a JSON string with build results:

{
  "durationMs": 1234,
  "shellFilesCount": 15,
  "postsCount": 3,
  "albumsCount": 2,
  "seoPagesCount": 3,
  "staticFilesCount": 5
}

serveCommand(optionsJson) → void

Starts the dev server. Accepts { "port": 3000 }. Blocks until terminated.

Config Format

All configJson parameters accept a JSON string matching config.json:

{
  "title": "My Blog",
  "description": "A personal blog",
  "logo": "/logo.png",
  "favicon": "/favicon.ico",
  "siteUrl": "https://example.com",
  "author": "Author",
  "language": "en",
  "timezone": "Asia/Tokyo",
  "basePath": "/",
  "github": "https://github.com/username/repo"
}

License

MIT