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 🙏

© 2024 – Pkg Stats / Ryan Hefner

statigen

v0.5.2

Published

A static site generator that supports html, ejs, and markdown source files

Downloads

272

Readme

statigen

A static site generator with built-in support for ejs templates and markdown-to-html transformations.

NOTE: This is still a work in progress, but please feel free to open github issues with any problems you encounter.

Installation

npm install statigen

Usage

#generate using the default `src` and `dist` folders
npx statigen

#generate using custom source and out directories
npx statigen --sourceDir source --outDir docs

Init

You can create a new project by running the init command. This will create a new directory and copy the default statigen template project.

npx statigen init path/to/new/folder

Templates

By default, html and markdown files will look for a file called _template at their level or above.

HTML templates

Place this comment somewhere in your html file, and that's where the other files will have their content embedded

<!--content-->

For example,

src/file1.md

# Cool title

_src/template.html

<html>
<body>
<!--content-->
</body>
</html>

Produces

__dist/file1.html

<html>
<body>
<h1 id="cool-title">Cool title</h1>
</body>
</html>

Frontmatter

You can add frontmatter to your markdown files which can be used to override certain items. Here are the currently supported values:

  • priority - a number specifying the priority of a file
  • parentPriority - a number to reorder the parent folder for a file
  • title - a title to use instead of the filename
  • parentTitle - a title to use for the parent folder instead of the folder name
  • template - a path to a custom template to use for the current file

Here's how you use it:

some-folder/some-file.md

---
priority: 1
parentPriority: 3
title: Some File
parentTitle: Some Folder
template: custom-template.ejs
---
Actual content