marknormanfrancis.com

Chips for week 23, 2021

Monday 14 June, 2021 at 6.03am

Week 23, 2021 ran from Monday 07 June, 2021 to Sunday 13 June, 2021.

  • tagged
    weekchips
    repo-flourish
    repo-sectile
  • Another week, and I’m still stacking chips. Last week’s chips looked like this:

    Intention

    At the start of the week, I wrote down four high level goals:

    1. More Sectile improvements in Flourish live preview — ✅
    2. Finish restoring old content — ✅❌
    3. Improve MNF navigation — ❌
    4. Add 1 year of Eurovision data — ❌

    Update

    I actually started the week off by writing the history of making GIFs. It started as background in last week's weekchips but kept getting bigger, so I spun it off as its own entry.

    Then I went to work improving the templating for this site, and any site that uses Flourish. One of the points of writing Flourish to generate static sites was to have much more control over the end result than any other static site generator I had looked at. At the core, I wanted these things:

    Although it is not yet documented (like, at all, apart from the tests), the Sectile library I'm writing is for that last point. It is heavily inspired by how pages were generated by the publishing system in use at Yahoo! Europe when I joined, and the attempt to open source that logic into a new publisher, called r3 (now abandonware).

    Briefly, how Sectile works is that you split up the page into many fragments ("sectility" is the ability of a mineral to be cut into thin pieces with a knife) with fragments including other fragments. Most templating systems allow you to include fragments, and even to create multi-level inheritance. Sectile differs from this in that rather than creating a specific tree of templates in advance, the template is assembled based upon what is known of the page, up to and including the full path. It can be hard to create specific templates or individual overrides to parts of pages in most template languages, it is nigh-on impossible to potentially do it for any given page on a site. Sectile allows this.

    The hard part is being able to understand how the fragments are being assembled. In the live preview of Flourish I built a feature to look at the template and data that is used to create the current page (I call it the "blueprint", and it would be eerily familiar to any of the handful of people in the world who had built pages at Yahoo). When using Sectile this can be invaluable. But I wanted it to not just show me the fragments and final assembled page, but allow me to edit them (and eventually the page content, like a CMS).

    I put together a short video demonstrating both the blueprint and how Sectile combines fragments depending on factors about the page, rather than in a strict hierarchy:

    That's what I spent the most of the week doing, with underlying features added to Sectile to support improvements to the blueprint in Flourish. This made it much easier to rework the site to use Sectile better in advance of adding the older content.

    Yes, this was all a way of procrastinating on something I've been putting off since starting this site redevelopment a year ago. But that was the last excuse gone, so I did get a fair amount of import work done on the old content over the weekend, just not finished.

    And speaking of procrastination, I didn't add any Eurovision data either.