Hi there, Welcome to Nicolino!
So, what is this?
Nicolino is a simple, fast and lightweight static site generator written in Crystal. Yes, yes, I know, all the static site generators are simple, fast and lightweight.
Should You use it?
Oh Jesus, probably not? It is good enough that I am using it for new sites, but it's probably not good enough for a regular user.
Why?
I have written a large, very flexible, static site generator in Python, and I wanted to see what would happen if I made very different decisions when writing the same sort of software.
So, instead of leveraging the huge Python ecosystem of libraries, I wrote the core of Nicolino from scratch, using only the standard library and a few choice dependencies.
What's good about it?
- It is fast
While benchmarks probably mean nothing since Nicolino is quite incomplete it does run this benchmark ... ok.
One thing the benchmark doesn't reflect is that Nicolino is much faster than that in normal use, when it's not doing a full build.
If you add a file or modify an existing page, Nicolino will only build the pages that depend on that file.
- It is simple
Again, this is in part an artifact of Nicolino not being finished yet, but it is also a design goal. Nicolino is meant to be simple to use, and simple to hack.
Part of the simplicity comes from it being very opinionated. It supports only markdown. The templates are Crinja (a lot like Jinja) the config is a single YAML file, and so on.
- It is lightweight
- I intend to keep it below 2000 lines of code. It currently has around 1550.
Features (So far)
- Pages compiled from markdown (like this one)
- Many other input formats via pandoc
- Blog posts compiled from markdown, with index page (see /posts )
- RSS feed of latest posts (see /rss.xml )
- Taxonomies (like tags, author, etc.) with their own indexes and feeds
- Images are resized and thumbnailed (see nicolino.jpg and nicolino.thumb.jpg )
- Jinja-like templates
- VenoBox based lightbox for images (click on Nicolino above)
- PicoCSS based theme (needs work, of course)
serve
mode, so you can see what the site looks likeauto
mode, which rebuilds while you edit and automatically reloads the pages in the browser- Shortcodes somewhat compatible with Nikola and Hugo
- Incremental builds, so it only rebuilds what's needed
- Image galleries (see Fancy Turning )
- Optional table of contents in posts/pages
- code blocks with syntax highlighting using HighlightJS
def foo():
print("bar")
Why the name?
I had written Nikola in Python. As a toy I wrote Nicoletta which is sort of the minimal viable static site generator. I ported it to Crystal.
So, I had Nikola, Nicoletta, and I needed a name for the fast, small but not too small Crystal project I was starting.
And you know who was deceptively fast and not very large? Nicolino Locche. So, Nicolino it is.
Who? This guy.