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

t3h-static-site-generator

v1.1.1

Published

Simple markdown static site generator script for a developers web-log.

Downloads

6

Readme

t3h-static-site-generator

NPM package is being tested, do not use.

My static site generator, used for my own website.

Written for use with Node.js 6+, supports posts in markdown with GFM syntax block and code highlighting.

I didn't like trying to learn the quirks and nuances of other site generators. This was used as an opportunity to learn some modern JavaScript and make my site work exactly how I want. I like to learn how and why things work so writing things from scratch makes sense.

The development of this project is developed using Github issues via a Waffle board: https://waffle.io/t3hmun/t3h-static-site-generator

This project is a neatly NPM packaged evolution of my slightly older site generator. The aim of this incarnation is to make it easy to use with GitLab CI.

Operation

Publishing

The site is generated by a single command:

$ node publish

The process involves:

  • Loading templates written in Pug that define the common layout of all pages.
  • Compiling posts written in Markdown and then inserting them into the Pug templates.
  • Rendering pure pug pages using the templates (including auto-generated post indexes).
  • Compiling CSS styles from LESS files.
  • TODO: Minfy JS.

I've tried to minimise the amount of external code, however Markdown, templating and CSS libraries are far too be to DIY (also pointless).

Preview

The preview mode does not launch a local server like most site generators. Instead it re-writes all the URLs as local files file:///, which works just fine on most browsers. This is also applied to all links; all links are coded to prepend the site's base-url in pug.

There is no clever code for properly resolving full links in the Markdown yet. Generally links withing the markdown are relative.

To generate an offline preview:

$ node publish test

Status

Updated 08th March 2017

In development, not ready for use (see Waffle board for progress).

First npm test release in testing.

The development is split into Milestones that signify a major step.

Initial Import Milestone

STATUS: Complete on time.

This was importing the old project and making it suitable for deployment as an NPM package.

Features Milestone

STATUS: Always ongoing.

Milestone to get all basic site features working properly.

Appearance Milestone

This is an infinite ongoing category for aesthetic tweaks. Always regarded as low priority.

HTTPS and Custom URL Milestone

This is the milestone to get the site (my site) working on GitLab CI (or any service tbh), with a custom URL using proper HTTPS.

NPM Package Milestone

STATUS: In progress.

License

GPL3