I’ve been looking for a way to add classes on some posts for layout purposes.
I’ve come up with the following:
Added a new parameter in a post’s front matter:
classes = "featured"
And then in the template I call it like this:
<div class="post {{ with .Params.classes }}{{ . }}{{ end }}">
Is this the correct way to go about it?