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

zola-bin

v2.0.0

Published

Zola, A Static Site Generator, as a NPM Package

Downloads

80

Readme

zola-npm

npm npm GitHub release (latest SemVer)

Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll. It is written in Rust and uses the Tera template engine, which is similar to Jinja2, Django templates, Liquid, and Twig. Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown.

Official Links

Why Zola as a NPM package ??

This package provides Node.js bindings for Zola, compiled directly from its source code and exposed via Node-API or standard JavaScript calls. This approach ensures performance close to that of native binaries while offering the convenience of an npm package, making deployment easier across various environments due to Node.js' extensive ecosystem and support.

Usage

Add it as a dependency into your project or a new one, using....

npm i zola-bin

or

npm i -g zola-bin

From CLI

Format: npx zola-bin [args]

args are same as official zola CLI. Additionally, In your project's package.json file, you call it inside a script after adding it as a devDependency.

"scripts": {
    "dev": "zola-bin serve --port 7000 --open",
    "build": "zola-bin build"
}

JavaScript API

import { build, init, check, serve } from "zola-bin";

Each of these methods are a wrapper around the CLI commands. You can refer to the JSdoc of each function or the type definitions on how to use them.

interface BuildOptions {
	baseUrl?: string;
	outputDir?: string;
	force?: boolean;
	drafts?: boolean;
	minify?: boolean;
}
export declare function build(rootDir: string, configFile?: string, options?: BuildOptions): void;

interface ServeOptions {
	interface: string;
	port: number;
	outputDir?: string;
	force: boolean;
	baseUrl?: string;
	open: boolean;
	storeHtml: boolean;
	drafts: boolean;
	fast: boolean;
	noPortAppend: boolean;
	extraWatchPaths: Array<string>;
}
export declare function serve(rootDir: string, configFile?: string, options?: ServeOptions): void;

export declare function init(name: string, force?: boolean): void;

interface checkOptions {
	basePath: string | undefined | null;
	baseUrl: string | undefined | null;
	drafts: boolean;
	skipExternalLinks: boolean;
}
export declare function check(rootDir: string, configFile?: string, options?: checkOptions): void;

Getting Started with Create Zola Site

With NPM installed, you can quickly setup a new Zola site with the following command:

npx create-zola-site -n {NAME}

This will create a new directory {NAME} and initializes the necessary files in it. Note that the site created using this process depends on Node.js, so you might see package.json and node_modules in the directory. This doesn't mean it any works different than actual template initialized by Zola. But This template will simplify the process of creating, building and deploying a new site.

if you already have a existing site, you can add the zola-bin NPM package to make it work same as the one created with create-zola-site.

npm init
npm i -D zola-bin

And then you can add the following script to your package.json file:

"scripts": {
    "dev": "zola-bin serve --open",
    "build": "zola-bin build",
}

FAQ

  • What is the difference between Zola and create-zola-site template ?

    • Nothing, directory structure is pretty much the same and works the same.
    • create-zola-site template creates extra files - package.json and node_modules, with zola-bin npm package as a devDependency, which builds bindings from the source code and exposes them as node.js function calls.
  • Why would I use this instead of the official one ?

    • Because for few who are used to NPM, this package makes it feel more like its a part of NPM ecosystem.
    • Easyily deploy the sites since Node.js and NPM are accepted by most of the hosting services.
    • Simple installation and usage.