Dec. 17, 2020, 10:17 p.m.

Eleventy

Known Unknowns

Eleventy is one of the sparkly new generation of static site generators. As a technology, it takes markup and compiles it (mostly at deploy time) into the static pages that can be quickly served to the user.

Unlike something like Gatsby (from my understanding), Eleventy doesn't do anything like rehydrating pages or pulling in information from APIs (mostly).

I see it as the true bare-bones - yet powerful - static page generator. For things like blogs, I don't have a need for anything more than a static site, so Eleventy is the perfect solution.

Pages built from Eleventy can be created from html, markdown, javascript, and other sources. It's agnostic about what source the content comes from.

It takes a list of input files, processes them and exports the final website. Using the configuration allows you to specify files that should be passed through unchanged (assets like style sheets and images, for example).

You can build your site by using includes for things like headers and footers and pass variables through inline data elements.

There's even the possibility to pull in data from JSON files into specific pages to render information.

Like I said, I see this as a very powerful tool to build a basic website without a lot of opinionated overhead. I suspect I'll be setting up some sites with Eleventy soon.

A couple of nice resources:

  • Julius Tarng's How the Heck do I use Eleventy - The Intro Guide I wish I had
  • Reg Hunt's Eleventy Walkthrough

You just read issue #22 of Known Unknowns. You can also browse the full archives of this newsletter.

This email brought to you by Buttondown, the easiest way to start and grow your newsletter.