
Show HN: Lego, a fast static site generator built in JavaScript - misterxi
https://astronomersiva.github.io/lego/
======
misterxi
Released v3 of lego, a JavaScript based static site generator.

Supports Liquid and Nunjucks for templates and Markdown for posts, and YML, JS
and JSON for data. Produces an optimised website as the output.

My own site, which has about 84 pages takes under a second to start a
development server and about 40 seconds to run a production build(asset
minification and versioning, HTML minification, inlining critical CSS, sitemap
generation, etc.).

Do take a look!

~~~
qmmmur
Why would I use this over pelican, Hugo, jekyll, 11ty? Asking sincerely as I'm
looking to create my dissertation in a Web based format.

~~~
misterxi
Pelican and Jekyll - Optimising the output is bit hard because most of the
tools for that exist in the JS ecosystem. If you are not that concerned about
stuff like inlining critical CSS, image optimisation, CSS and JS traspilation,
these could be good choices.

Hugo - Pretty much the same issues with Jekyll and Pelican, and the templating
language also leaves a lot to be desired. If build speed is paramount to you,
choose this.

11ty - I just benchmarked lego against this and it looks like there is only a
couple ms difference performance wise. The only real difference is that 11ty
lets the users configure everything and decide what kind of optimisations they
want(or if at all they want it).

lego supports the templating languages of both Pelican and Jekyll and is
reasonably fast as well. It also optimises the output build as much as
possible. If at all you decide to use it, please share your feedback.

Another important factor, in your case, might be the availability of
templates. Pelican, Hugo and Jekyll should have readymade templates for most
use cases and should save you time spent on designing the layouts, writing
CSS, etc. I am not sure if 11ty has such an ecosystem. lego definitely doesn't
have any templates and you might want to factor that in your decision.

I hope this answers your question. Also, all the best with your dissertation
:)

~~~
qmmmur
Thanks for your response. As you alluded to, I found a theme for Hugo that
worked out of the box for what I needed (essentially a book format). I don't
need much customisation on the layout and my main focus is reducing
development time implementing different kinds of content in an easy to
structure manner.

