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

kowals-static-blog-generator

v1.2.2

Published

Static blog generator from markdown and pug files

Readme

kowals-static-blog-generator

This CLI utility creates static .html pages from provided .pug and .md files.

Working example can be found in this github repo that contains my blog.

Creating new blog

Initial setup

First open terminal, create new blog directory, initialize npm project inside and install kowals-static-blog-generator:

mkdir my-blog
cd my-blog
npm init -y
npm i -S kowals-static-blog-generator

Next open package.json and add following script in script section:

"scripts": {
  "build": "kowals-static-blog-generator ./src ./dist https://yoursite.example"
},

Of course https://yoursite.example change to your site. However this param is optional. If you provide it - generator will create sitemap.xml file in the root of .dist directory. If omitted - no sitemap.xml will be created. This file is helpful for bots to properly index site.

Now you are able to run following command from terminal

npm run build

Everything what it does - it takes files from ./src directory, converts to static .html files and put them to ./dist folder.

./src setup

./src folder is a place where your blog files live. Structure of this folder should look like this:

src/
  |- assets/
  |    |- some-photo.png
  |    `- styles.css
  |
  |- layout/
  |    |- includes/
  |    |    |- _footer.pug
  |    |    `- _header.pug
  |    |
  |    |- layout.pug
  |    `- post.pug
  |
  |- pages/
  |    |- blog.pug
  |    `- index.pug
  |
  `- posts/
       |- 2020-07-04/
       |    |-assets/
       |    `-post.md
       |
       `- 2020-07-10/
            |-assets/
            `-post.md

Let's take a closer look:

  • assets/ - there live files that should be copied to ./dist folder without modifying.
  • layout/ - contains general structure of page written with .pug template engine.
  • pages/ - .pug files that extends layout.pug - they will be translated to .html and copied to ./dist.
  • posts/ - finally - blog posts written in markdown. Every post should be in folder describing its date of creation. Note that every post should be named post.md. Layout of post is extended from post.pug. Every image related to post can be placed into assets/ in post directory.

./dist generation

After run npm run build command there will be created ./dist folder with target files:

dist/
  |- assets/
  |    |- some-photo.png
  |    `- styles.css
  |
  |- posts/
  |    |- assets/
  |    |- 2020-07-04-some-title.html
  |    `- 2020-07-10-another-title.html
  |
  |- blog.html
  |- index.html
  `- sitemap.xml

This files can be uploaded directly to the server.