What is the stylistically preferred method for the following setup?


What is the preferred method for achieving the URL structure below?


This page lists all the minimalist themes.


This page lists all the colorful themes.


This page lists themes that were featured in July. This could be specified as a tag. e.g. tags: - featured-july


This would just list the themes created by bep. This could be specified as a tag e.g. tags - author-bep, or directly with author: bep.


At rooturl/theme-name/ the page for the specific theme would appear. This page would then have info on the theme, as well as link to the pages that contain it (e.g. themes by bep, featured in july, etc).

My main point of concern is the URL structure. I’m confused about how I could use the fact that everything is a page to achieve my desired URL structure, while also being able to apply custom selectors (e.g. selecting by tag, author) to create custom list pages.

Is this possible?

Yes, it is possible. Your question is very broad, and there are multiple ways to do what you are describing. The best route now is to start a test Hugo site and trying to figure out how to do that on your own, and then come back here with specific questions about blocks you are hitting.

@maiki Thanks, been using hugo for a few months now. I guess my specific block is I can’t figure out how to create a section list that uses a custom URL slug.

The /themes/ works fine, but the /minimalist-themes/ shows up blank. I just copied the _index.md from the themes folder into minimalist-themes, as well as copying the .html file from /section

You ought to publish your site in an online place, so we can look at it. Otherwise we can’t assist you.

@maiki Fair enough! I’ll do that and get back to you.

EDIT - Consider this solved enough for now. I’ll come back if I run into specific problems!

Okay, two improved questions.

Here’s my site: https://github.com/arikroc/themes-eg

Q1. Is it possible to change the URL of an _index.md subpage in a folder in content [/content/oct-17/_index.md]? Setting url in the slug doesn’t work. Changing the folder name works, but that seems odd.

Q2. Could I represent something like “range .Site.Taxonomies.tags.featuredjun17” in a page param? It works fine if I hard code the variable, but I’m wondering if it’s possible for me to generate new “custom categories” pages simply by creating a new file in the root of /content/ with displays set to a custom category.

Edit, consider question 2 solved. I’m using: https://novelist.xyz/tech/custom-urls-for-category-pages-in-hugo/ - though LMK if there’s something better.

I tried range .Params.displays

where displays = “.Site.Taxonomies.tags.featuredjun17”

However this didn’t work.

Error while rendering “page”: template: theme/_default/single.html:7:38: executing “theme/_default/single.html” at <.Params.displays>: range can’t iterate over .Site.Taxonomies.tags.featuredjun17

Q3. Is there a better way to do this? e.g can I customize the inbuilt URL structure around taxonomies - so instead of /tag/by-mr-broccoli/ I can set that page to /by-broccoli/ for example?

@maiki Any pointers?

EDIT - Consider this solved enough for now. I’ll come back if I run into specific problems!