⚙️ Make the git commits available as a custom collection
Mon, 21 Dec 2020 02:22:45 GMT
There were two approaches I considered for making the git commits available within templates.
- Loading it in a data file
- Defining a custom collection
The biggest deciding factor was Markdown. Commits are authored with Markdown conventions, and I’d like those to be translated into HTML on the website. Configuring another Markdown-It parser in a data file is definitely possible… but I’ve already got one defined right here in the Eleventy config, so why not reuse it.
I could see going back to loading via data files if this starts to feel goofy. The impact in templates will be minimal.