Best practice for having different styles of listing depending on the category

Hi,

I was looking to change the categories pages (e.g. Book notes - Adam's Brain Dump ) such that depending on the category they would appear in different formats.

For instance I want my books notes page to look different to my other categories.
Thanks to some very helpful posts in this forum I learned that the template the categories pages use is

layouts/categories/taxonomy.html

So I’ve successfully done a lot of conditional stuff in there, like

{{ if eq .Title  "Book notes" }}
<p>whatever</p>
{{  end }}

and

{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }}
 
  <p class="archive-entry">
  
  {{ if in .Params.categories "Book notes" }}
<p>whatever</p>

This all works but I was wondering is this the recommended way or should I be using separate files somehow for each category? If I had a lot of categories it could get a little messy.

The other thing I wondered was does the archive page somehow use layouts/categories/taxonomy.html ?

That’s the only file I added/modified in my custom theme, and somehow I seem to have broken the Paper theme’s “Hide category list on Archive page” option. Now my archive page never shows my category list, no matter if I tick that box or not (the page in question is Archive - Adam's Brain Dump and I have 3 categories it should list at the top)

I reinstalled the theme just in case I’d edited something by accident but it didn’t help.

I figured it would be using layouts/_default/list.archivehtml.html which I don’t think I touched, but is there any chance what I did to taxonomy.html is over-riding is somehow? It used to work fine so I’m certain it’s my fault :slight_smile: