This site is being built in the open

I decided to start over on a twenty year old personal website. Things will definitely feel rough draft as I build up a world from scratch. You can follow along with the progress on the commits page.

🤓 Put all the commits on an index page

Mon, 21 Dec 2020 02:44:24 GMT

This is a bit more complex than I’d want it to be, but there are motivations. When I attempted to render the ol list within the markdown file itself, the trailing </article> tag was being interpreted as a code block, for reason I don’t understand.

If the reversed attribute wasn’t being used, an attempt could be made to generate Markdown from the templating language. This would wind up being something like…

{% for commit in collections.commits -%}
1. {{ commit.subject }}
{% endfor -%}

But this feels gross. A template language (Nunjucks), generating a markup language (Markdown), that will be rendered into another markup language (HTML). It’s a lot of places to have to investigate if something ever goes sideways.

While rendering HTML within Markdown is nice, it’s not strictly necessary. Moving the generation of the list into a Nunjucks template feels like the best solution that preserves writing words in Markdown, and iterating over data in HTML.