0.0.1 ā€¢ Published 3 years ago

@datahjelpen/statisk v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Statisk.js

An opinionated static site generator using Nunjucks

Tired of setting up Webpack, Babel, Gulp, Grunt, Bower, Browserify and the likes when all you really want is a simple way to build HTML files with a templating system? Then Statisk.js is for you.

Setup

Statisk.js expects a certian folder stucture, like so:

šŸ“¦ src
ā””ā”€ šŸ“‚ views
ā”‚  ā”‚  šŸ“œ page-1.njk
ā”‚  ā”‚  šŸ“œ page-2.njk
ā”‚  ā”‚
ā”‚  ā””ā”€ šŸ“‚ templates
ā”‚     ā”‚  šŸ“œ template-1.njk
ā”‚     ā”‚  šŸ“œ template-2.njk
ā”‚
ā””ā”€ šŸ“‚ css
ā”‚  ā”‚  šŸ“œ style.css
ā”‚
ā””ā”€ šŸ“‚ js
ā”‚  ā”‚  šŸ“œ script.js
ā”‚
ā””ā”€ šŸ“‚ images
ā”‚  ā”‚  šŸ“œ image-1.png
ā”‚  ā”‚  šŸ“œ image-2.jpg
ā”‚

It will generate an output in /dist.

Other files (JS, CSS, Media files) are just copied over as long as they are inside /src; They don't need to spesifically be in a folder named like css or js. For example /src/folder-1/folder-2/style.css will generate /dist/folder-1/folder-2/style.css.

Future development

Our goal with Statisk.js is to keep it stupid simple and not let it grow too big. We don't want to support options or alternatives for everything there is. We want it to do one thing, and to do it well.