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.
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).
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
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.
STATUS: Complete on time.
This was importing the old project and making it suitable for deployment as an NPM package.
STATUS: Always ongoing.
Milestone to get all basic site features working properly.
This is an infinite ongoing category for aesthetic tweaks. Always regarded as low priority.
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.
STATUS: In progress.
GPL3