This site goes up to Eleventy.
Articles & Blogs

This site goes up to Eleventy.

Ethan Marcotte · Jul 15, 2024

<p>The world’s got a few things going on, and I’ve been tinkering with my website.&nbsp;<sup class="footnote-ref"><a class="footnote" href="#fn-theme" id="fnref-fn-theme" aria-labelledby="title-footnotes">1</a></sup> More specifically, I just migrated off of <a href="https://jekyllrb.com/">jekyll</a> and over to <a href="https://www.11ty.dev/">Eleventy</a>.</p> <p>(Fair warning: this post is entirely too long; even worse, it’ll get very lightly technical. So if <code>How Markdown Files Go Brr</code> isn’t of interest to you<span class="w">&thinsp;—</span>&thinsp;and believe me, <em>I get it</em><span class="w">&thinsp;—</span>&thinsp;feel free to skip this post.)</p> <p>Truth be told, I didn’t need to change anything about my publishing setup. I’ve been using jekyll for over a decade. It’s lovely software, and I’ve been really happy with it. But in recent years, it’s started to become a bit slow to work with. On top of that, I’ve never been <em>any</em> good with Ruby, the language jekyll’s written in. That means that outside of copying-and-pasting a couple borrowed plugins, I’ve more or less been locked into jekyll’s default feature set.</p> <p>That’s why I started playing with <a href="https://www.11ty.dev/">Eleventy</a>. Eleventy’s a static site generator created by my friend and colleague <a href="https://www.zachleat.com/">Zach Leatherman</a>. I am <em>very</em> late to this particular party, of course: <a href="https://anhvn.com/">tons of</a> <a href="https://markllobrera.com/tags/eleventy/">very</a> <a href="https://henry.codes/writing/how-to-use-contentful-with-eleventy">cool</a> <a href="https://kayserifserif.place/">people</a> have been playing with Eleventy, and doing terrifically exciting things with it. So a few years back, I created a new branch, and started tinkering.</p> <p>As you might know, a few things happened in the interim: there <del>was</del> is <a href="https://ethanmarcotte.com/wrote/let-a-website-be-a-worry-stone/">a global pandemic</a>; I got busy; <a href="https://ethanmarcotte.com/wrote/notes-from-a-week/">I got sick</a>; I got better; <a href="https://ethanmarcotte.com/wrote/you-deserve-a-tech-union-book/">I wrote a book</a>; I got <a href="https://ethanmarcotte.com/wrote/18f/">a new job</a>. That’s all to say that the Eleventy migration stopped, started again, <em>re</em>started, and then basically…fell apart and languished. But I finally got a little momentum going earlier this year, and just pushed the changes live last night.</p> <p>Overall, the migration went really well. I did stumble on a few things, though:</p> <ul> <li> <p>jekyll makes a bunch of really handy <a href="https://jekyllrb.com/docs/variables/#global-variables">global variables</a> available to site owners, nestling key pieces of data underneath objects like <code>site.</code>, <code>page.</code>, <code>layout.*</code>, and so on. There’s a mental model at play there, and it made a lot of sense to me.</p> <p>By contrast, Eleventy doesn’t have a similar structure. And honestly, that’s mostly fine! But when I was first starting to tinker, it did make Eleventy feel a lot…well, <em>fuzzier</em> than jekyll did.</p> </li> <li> <p>I used <a href="https://jekyllrb.com/docs/liquid/tags/#link">jekyll’s proprietary <code>{% link %}</code> tag</a> to link to, like, everything on my site. It is an incredibly handy way to link to arbitrary files, and finding an Eleventy equivalent was <a href="https://github.com/11ty/eleventy/issues/544">one of the first things I asked about</a>. I was never happy with any of my custom solutions, so when I found out about <a href="https://www.11ty.dev/docs/filters/inputpath-to-url/">the new <code>inputPathToUrl</code> filter</a> in the Eleventy 3 alpha, I upgraded with a quickness. And it’s been <em>great</em>.&nbsp;<sup class="footnote-ref"><a class="footnote" href="#fn-alpha" id="fnref-fn-alpha" aria-labelledby="title-footnotes">2</a></sup></p> </li> <li> <p>If there’s a better way to debug issues in Eleventy, I’d love to learn it. Errors can often result in <a href="https://blog.thecodewhisperer.com/permalink/deciphering-an-11ty-error-message">an intimidating pile of warnings in the console</a>, and <a href="https://www.11ty.dev/docs/filters/log/">adding <code>log</code> filters</a> everywhere usually didn’t feel productive.</p> </li> <li> <p>About a week ago, I noticed that nearly all of my post dates were wrong: if I’d written a post on February 10, the post would appear on my website with a timestamp of February 9. After hours of frustrated research, I learned that <a href="https://www.11ty.dev/docs/dates/#dates-off-by-one-day">this is by design</a>, and is even listed as <a href="https://www.11ty.dev/docs/pitfalls/">a common pitfall</a> for those using Eleventy the first time.</p> <p>Thanks to <a href="https://mtm.dev/eleventy-date-off-by-one-day">a few</a> <a href="https://www.justus.ws/tech/eleventy-utc-dates/">very helpful</a> <a href="https://rknight.me/blog/eleventy-post-dates/">blog entries</a>, I managed to get a solution in place.&nbsp;<sup class="footnote-ref"><a class="footnote" href="#fn-dates" id="fnref-fn-dates" aria-labelledby="title-footnotes">3</a></sup> But man, I wasn’t expecting this little curveball, and I could see other folks getting tripped up by it too.</p> </li> <li> <p>Related to that<span class="w">&thinsp;—</span>&thinsp;and this might just be me, mind<span class="w">&thinsp;—</span>&thinsp;I had some difficulty navigating <a href="https://www.11ty.dev/docs/">Eleventy’s documentation</a>. When other people wrote about an issue with Eleventy, <em>they’d</em> often link to something in the docs that would get me unstuck. And generally, I found that was a theme with my migration: I’d start by searching the internet for guidance on an issue, rather than the Eleventy documentation itself.</p> </li> </ul> <p>I don’t want to suggest that my experience was bumpy, mind you<span class="w">&thinsp;—</span>&thinsp;far from it! Overall, I am <em>delighted</em> by how easy it was to move a decade’s worth of material over to Eleventy. And now that I’ve moved things over, here are some of the things I’m most excited about:</p> <ol> <li><strong>It’s fast.</strong> My jekyll site wasn’t exactly slow, but it was definitely starting to feel creaky. By comparison, Eleventy has been downright <em>zippy</em>.</li> <li><strong>Eleventy feels like a playground.</strong> Eleventy just seems really, really good at ingesting random data from around the web, and pulling it into a website. I get excited when I read about <a href="https://markllobrera.com/posts/letterboxd-to-markdown/">my friend Mark’s ability to pull Letterboxd reviews into Eleventy</a>, <a href="https://coryd.dev/posts/2024/integrating-a-somewhat-custom-cms-with-eleventy/">the feature Cory built to publish his music listening stats on his blog</a>, or <a href="https://melanie-richards.com/blog/new-reading-page/">Melanie’s fancy new reading page on her (gorgeous) website</a>. Honestly, I can’t wait to start tinkering myself.</li> <li><strong>I feel like I have a blog I can extend.</strong> Related to that, I’m glad I have a site that’s built on technology I’m a little familiar with. As previously mentioned, I am completely useless when it comes to Ruby; while I’m no JavaScript expert, I’m very comfortable with it. And that’s something of a relief.</li> <li><strong>Eleventy is powered by its community.</strong> I’ve known <a href="https://www.zachleat.com/">Zach Leatherman</a> for years, and I’ve always admired the way he’s cultivated a community around Eleventy. I’m doubly excited that there’s <a href="https://www.11ty.dev/blog/sustainability-fundraising/">an active push to make Eleventy financially self-sustaining</a>, moving the platform to a point where it’s supported by donations from its community. That kind of support makes me hopeful for the platform’s future.</li> </ol> <p>Anyway! I’m delighted to have hit this little milestone, and to be on a platform that feels exciting <em>and</em> sustainable. Of course, if I’ve done my job right, you won’t notice any changes. Not until the redesign’s done, anyway.&nbsp;<sup class="footnote-ref"><a class="footnote" href="#fn-redesign" id="fnref-fn-redesign" aria-labelledby="title-footnotes">4</a></sup> But of course, if you <em>do</em> see anything amiss: please <a href="https://ethanmarcotte.com/contact/">drop me a line</a>, and I’ll get things sorted straightaway.</p> <p>As always, thank you for reading.</p> <hr /> <div class="footnotes flow"> <h2 class="hed-footnotes has-dash" id="title-footnotes">Footnotes</h2> <ol><li id="fn-theme" class="footnote-item"><p>Yes, this is <a href="https://ethanmarcotte.com/wrote/thread/">becoming a bit of a running theme</a>.&nbsp;<a href="#fnref-fn-theme" class="reversefootnote">↩︎</a></p> </li> <li id="fn-alpha" class="footnote-item"><p><del>I should note that when I switched from version 2 to version 3’s current alpha, my build times nearly doubled. But since we’re talking about a change of, like, three seconds to five seconds, and since Eleventy 3 is still in alpha, I have absolutely no problems whatsoever with this.</del> Thanks to a recommendation from a friend, I upgraded to <a href="https://github.com/11ty/eleventy/releases/tag/v3.0.0-alpha.15">a later alpha of Eleventy 3</a>, and that cleaned things <em>right</em> up. I’m back down to two second builds! Yay!&nbsp;<a href="#fnref-fn-alpha" class="reversefootnote">↩︎</a></p> </li> <li id="fn-dates" class="footnote-item"><p>Namely, figuring out enough of <a href="https://momentjs.com/">Moment.js</a> to write some little date formatters.&nbsp;<a href="#fnref-fn-dates" class="reversefootnote">↩︎</a></p> </li> <li id="fn-redesign" class="footnote-item"><p>Yep, I’m working on a redesign<span class="w">&thinsp;—</span>&thinsp;and I’m actually pretty excited about it! (And yes, it’ll probably be here in another geological era or two.)&nbsp;<a href="#fnref-fn-redesign" class="reversefootnote">↩︎</a></p> </li> </ol> </div>

<hr /> <p>This has been “<a href="https://ethanmarcotte.com/wrote/eleventy/">This site goes up to Eleventy.</a>” a post from <a href="https://ethanmarcotte.com/wrote/">Ethan’s journal.</a></p> <p><a href="mailto:listener+rss@ethanmarcotte.com?subject=Reply%20to:%20“This site goes up to Eleventy.”">Reply via email</a></p>

Jump to
Projectsbrowse
Peoplebrowse
Companiesbrowse
Saved
Editor
Autosaves as you type