BjRo/Looking-for-Kaizen — comment on commit 266b1f97deb66b2b3e22ff96149c3a13242178a8
File: source/_includes/custom/asides/categories.html line 3
By ilkerde:

This comment is going to be a little biased. Some background is needed.

In web templating markup, there's two schools (I know of) out there. The first school is the school of _"stable markup"_. It depicts that you should _generate_ markup only what's really needed. OTOH, there's the school of _"ascetic markup"_. It says that _every tag_ (regardless whether static or dynamic) has to be _required_ and _reasoned_ in context of their usage, environment, and content. Since I have had experience in larger web projects, I'm more or less leaning on the ascetic side.

As such, I favor to bind highly cohesive - speak "related" - markup together. In this case, it means that `

` and `
` together build a _list_, namely your list of categories. However, the category list (as a unique list) is not made up in it's entirety. Imagine the (very rare) case that a post doesn't have any categories. Your markup would look like _"here's an empty list"_ with `

`. That's totally fine as long as you don't care much about bytes or stable layouting. Ntl, if you really are going to create a HT-website, I'd recommend you to prefer to emit `

` along with liquid tag. As a side effect, it makes me feel that your naming of the helper (`category_list`) is semantically correct then.

What a long, useless comment ;-)