How This Site is Built

For this website, I decided to use the static site generator Eleventy. There’s a lot to like about Eleventy, such as its support for a variety of templating formats. I’m using mostly EJS for the page structure and Markdown for written content.

I was finding that Eleventy wasn’t robust enough to handle assets like stylesheets the way I wanted, so to resolve this I decided to use gulp.js. The main task compiles and minifies my SASS files and minifies any JavaScript files as well.

One of the nice features of Eleventy is a built-in server which automatically updates whenever template files change. It makes local development a lot easier. I wrote a corresponding gulp task so that any asset files are also rebuilt whenever they are edited.

Finally, to make everything work well together, I have the following scripts defined in my project.json file.

"start": "gulp && (eleventy --serve & gulp watch)"
"build": "gulp && eleventy"