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 🙏

© 2025 – Pkg Stats / Ryan Hefner

staticpug

v0.2.17

Published

the clean static HTML generator from HAML files using pug rendering the templates

Readme

staticpug

build workflow
The clean static HTML generator from HAML files using pug rendering the templates

  • Render pug templates to html
  • Read markdown files and insert them into the template
  • Simple and easy structure to deal with
  • Errors complitly explained

In order to use this package, you need to know about PUGjs - language reference

Table of content

notice

VERY CASE SENSITIVE, this is a file-template base HTML generator and is sensitive to folder structure and and case sensitive!

  • file names
  • variables names
  • everything

Commands

sp-init

OR sp-create. Creates a simple sample project to help you make your own website by just modifying it

  • src/page/ (why src/page? because the template may contain layout and other components so the base pages goes to folder src/page)
  • public/
  • staticpug.config.json

sp-build

OR sp-execute. Builds the website by copying all files from public folder to destination and make HTML files from pug templates provided inside the source folder
Read options from one of staticpug.config.json, staticpug.json, staticpug.config file or at staticpug secton on package.json file | option | type | default | explain |
| :--- | :---: | :---: | :--- |
| staticFilesDirectory | array / string| "static" | the folder/folders to copy to destination/destinations , it can have subfolders |
| destinationDirectory | array / string| "dist" | the destination/destinations folders that contain the result files |
| sourceDirectory | array / string| "src" | the folder/folders that contain/contains template files , it can have subfolders |

How it works

All files in source folder and it's subfolders (default: src) will be affected.
The JSON file named after the pug file will be used to pass data to the pug file.
When a folder name after a pug file exists, the markdown files inside that folder will pass to the pug file as article.content, you can use it in your template (pug file). The JSON file named after the markdown file will be used to pass other informations (for each article). Each template folder can have an index file, a file named as polar of the folder name. (exp: class: classes, post: posts)
When no folder be found for the pug file, it will be simply converted to a HTML page.

Contribute

Please contribute, it's hard to continue alone >_<