How to organize a single page with links in sections?

Hi,
I have a awesome style page with a bunch of links in different sections, currently written in Jekyll. All links are formatted manually with Jekyll’s {tags} for CSS classes. It’s ca. 150 links in 7 sections. Maintaining it has become cumbersome so I decided to organize it better and move it to Hugo, as I know it a little bit better than Jekyll.

I started doing it as a single yaml file in data/, with sections, simply iterating over all sections and entries, using the same partial template for the each entry. But since links in every section are displayed a bit differently (e.g. books may have one cover picture and links to reviews, people have social media links with images) the partial template grew and become hard to maintain too.

I was thinking about putting each entry as a front matter in a separate file under contents and leveraging section list & section single templates but that’s a lot of content files.

Can you suggest some solutions please?

Cheers!

I think you have answered your own question.

Forget for a moment that you are organizing links. Think of them as things. Some of the things are people, some are books, etc. It sounds to me like 7 content types. Which means 7 directories under content/. Then you can leverage Content View Templates as needed.

Not really. A simple 10,000 page site can be rendered in 2-3 seconds.

1 Like

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