Group pages on the list by Series

Hello everyone!

I’ve spent two days researching, but haven’t found a working solution. And I was under impression it should be something not very complex. :slight_smile: Maybe someone could point me in the right direction.

Inside “content” folder I have a couple of pages and two folders: “posts” and “writing”. The first one holds blog, the second one holds stories. Inside each folder there’s an _index.md, and each has its dedicated folder with list.html in layouts. In config.toml I have the following taxonomies:

[taxonomies]
tag = “tags”
category = “categories”
series = “series”

Pages that reside in “writing” folder have a “series” field on their front matter. What I need is to group them on their index (list) page by series, so that it looks something like this:

Series 1
– Story 1
– Story 2
– Story 3

Series 2
– Story 4
– Story 5
– Story 6

Is it possible to achieve? How do I a go about doing that? Would be really grateful if someone could explain as if I’m dumb (which I probably am). :slight_smile: I’ll handle html/css from there.

Thank you in advance!

a link to a public repo would be fine …

I have series & book lists in my sample on GitHub

You are free to copy what you need
HTH

Thank you, I’ll have a look.

I don’t have a repo, it’s still quite some work until then. :slight_smile:

ETA: I think it’s too complex for me, I’m sorry. I don’t understand enough to be able to find pieces that I could use. It’s my first attempt with Hugo, I’m still reading documentation. :slight_smile:

Thank you anyway for trying to help. I do appreciate it.

Here’s an example (requires Hugo v0.113.0 or later):

git clone --single-branch -b hugo-forum-topic-44750 https://github.com/jmooring/hugo-testing hugo-forum-topic-44750
cd hugo-forum-topic-44750
hugo server
2 Likes

Looks like this is what I need. Thank you very much! :slight_smile:

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