Gallery vs Blog view

Greetings, I’m building a portfolio type site, and basically would like to change how the results are displayed based on their directory.
I have a ‘art’ folder where the items there are displayed as grid/gallery. I have a ‘blog’ folder where I’d like to change the appearance from gallery to regular vertical blog post stacks (for example, as in PaperMod’s theme default post listing).
Is this achieved with new layouts? If yes, how can I implement a layout for posts under a specific directory, eg: /blog

Base theme I’m using is eternity, and from what I understand from list.html it calls sliders to display the content for the gallery. Can I use a sort of second list.html that will get called only for /blog/ posts?


If this is the theme, you’ll need to copy the layouts/_default/list.html into layouts/blog/list.html and edit it accordingly.

1 Like

thank you. does that work with any kind of layout I’m overwritting? for example I’d also like to affect the listing of specific tags, so when viewing /tags/demotag it’ll again use a custom way of displaying the content

Tags will use the terms.html file. Copy that too into the blog folder in your layouts and edit accordingly.

for some reason the actions inside will work only if I put terms.html in _default folder. using it inside /blog/ either ignores it or reverts to the theme’s original terms

I am not very familiar with Hugo’s taxonomy as I have never used it. Maybe others can help you here, cc @jmooring .

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.