Categories
JavaScript Static Site Generators

Static Site Generator Opinions

Eleventy looks good for actual simplicity and genuine static sites.

Nuxt

Nuxt Update 2.13

19 June 2020: Now supports target: static to actually build a static site.


TL;DR: up to and including 2.12 do not support writing fully-static HTML without client side JS. It gets part the way there whereby you don’t need a Node server, however there’s still 150kb+ of client JS.

A coming version should support a ‘static’ directive to avoid that.


Just dabbled with this for potential client project. Seems powerful for apps and SPA, and it apparently does SSG and SSR; HOWEVER their definition of a static generated site means static files, but the page rendering is still done with JS!

I found issues on their Github, and log running RFCs to discuss making real static HTML files that have the content actually rendered there are built time, but still nothing implemented as of April 2020.

It’s pretty frustrating TBH, because if the result is static content on the page I’m not sure why the JS community cannot fathom writing it into the HTML file and not into a JS render function.

You’d lose the power of the SPA.

Whoever

Yeah, that’s fine. The browser is really good at navigating pages. If they are static HTML they will be super fast, the routing is automatic, the whole thing is super portable and SEO friendly.

Gridsome & Eleventy

These are probably the best of the non-React JS ones to try next.

Gridsome uses GraphQL and if you know that might offer power for fetching data.

Eleventy looks like it probably can with Data sources that use functions/async funcs to fetch data for build. If you were iterating on a site could you separate fetching API data from each build so you have more control about when that runs?