New theme

This website has a new, slightly improved stylesheet!

Experimentations

The previous layout let the text flow through the browser viewport’s whole width. The idea was to get back to the origin of the web, and let readers decide how wide they wanted their text by adjusting the browser window.

Great idealistic idea in theory. But the result definitely felt unfinished by modern standards.

So here is a new variation with a max-width: 65ch.

In the process, I experimented with two features that ended up being rolled back. Here’s why.

Alternate stylesheets

Wouldn’t it be nice to keep a minimal stylesheet by default, and offer prettier but heavier alternatives for the reader to choose from? Modern browsers support this out of the box, right?

Well, kind of. There is an HTML specification for it: just list your default stylesheet with <link rel="stylesheet" …> and the other ones with additional <link rel="alternate stylesheet" …> tags. Easy.

Except that the feature is only supported in Firefox, IE, and Opera. And (at least in Firefox) the selection is not sticky: switch to an alternate stylesheet, reload the page, and you’re back to the default stylesheet. Not useful in practice. Ah, and all stylesheets are queried on page load, defeating the initial performance purpose.

Yes, some Javascript magic could solve that. But I want to keep this site as JS-free as humanely possible.

The jekyll-assets gem

Since I’m used to work on Rails projects, having assets managed by Sprockets for this Jekyll site seemed like a good idea.

There are a few annoyances and a quasi-show-stopper with this gem: the author is maintaining it alone, and doesn’t have a lot of time to do so. The documentation is a bit confusing in my opinion, and doesn’t document a breaking change (no more asset_path helper).

And the show-stopper: the gem is not white-listed by GitHub Pages. Which means I can no longer push the main branch and have GitHub auto-build the site. The solution would be to pre-build locally, and push that. An additional deployment step that wasn’t worth the trouble in this case.

So, after a lot of RTFM and commits, the code is back to a KISS version, which is not so bad after all.