Migrating from Laravel to Eleventy

• 2 min read

Instead of finishing the many blog post drafts I have in iA Writer, I've spent the last couple of days/weeks replacing the tech stack that runs this website.

As of May 12th 2024, stefanzweifel.dev now runs on Eleventy and is hosted on Cloudflare Pages.

Previously, my website was a static build of a Laravel app. The app had controllers for the various pages and used Filament as an admin panel to write content.

In local development, I had no build process.
When a commit was pushed to GitHub, a GitHub Actions workflow was triggered, which checked out the repo and created a static HTML build of the entire app.

This whole contraption worked well; but it felt heavy. A Laravel app is by default not made to be a static site generator.

For a long time, I've been following Zach and the whole Eleventy community on the fediverse. The vibe of the 11ty community mirrors that of the Laravel community: everyone is friendly, open, and wants others to succeed with the tools they were given.

Earlier this year, I read the entire Eleventy documentation from start to finish and decided to give Eleventy a try. After a few beginner hurdles[1], the migration was pretty smooth. As I previously stored the content of my website already in markdown files using Orbit, I could literally copy and paste the files to the Eleventy project.

I then had to convert the Blade templates to Nunjucks – basically just replacing the foreach-loops – and install a couple of packages that help generate RSS feeds and sitemaps.

There were obviously some more steps involved (the draw the rest of the fucking owl meme comes to mind). But some of the steps I want to document in separate blog posts, as I think they could benefit other Eleventy users as well.

I'm also thinking about making the entire repo public so others can learn how I built my site. (I was immensely grateful that others made their Eleventy websites public)

My tech stack is now documented on the new colophon page. I added links to websites that were inspiration for past and the current design of my website.

  1. The different template engines supported by Eleventy and how they interact with each other were confusing at first. I've now restricted my setup to always use Nunjucks as the HTML template engine. ↩︎