Structuring online magazine: attaching metadata to taxonomy terms

I’m new to hugo and I’ve read through the docs but am still a bit unclear how I would structure a website which has the following URL structure:

List of issues:
site.com/issues

A specific issue (shows the magazine cover)
site.com/issues/issue-name

Individual articles in the issue:
site.com/issues/issue-name/article-name

I believe I should use taxonomies.

  • Issue <- Taxonomy
    • First Issue <- Term
      • Article 1 <- Content
      • Article 2 <- Content
  • Second Issue <- Term
    • Another article <- Content

I think that should work fine, but if anyone has a better suggestion please let me know.

But I have two questions about this.

  1. How do I attach meta data to Terms? For example, each issue (such as “First Issue” and “Second Issue” above) should have a short description and a thumbnail URL.

The meta-data would be seen when the user goes to:

site.com/issues

  1. I’m not exactly sure how to get my desired URL structure: site.com/issues/issue-name/article-name

In the docs (https://gohugo.io/templates/terms/) I see how site.com/issues would list all of issues (terms), but it’s unclear to me how content can be nested under the terms.

Thank you!

There is an open issue about getting Nodes (a taxonomy is a Node) to behave like a Page, with front matter and all. This will happen at some point, but until then you will have to keep your metadata in a map structure in /data (see Data Files in the doc), and use the taxonomy term or something as a lookup key.

Ah OK, thank you. That was actually my plan (store all of it in JSON).

I’m still a bit unclear on the URLs. But I will dive in and start experimenting. I’m not sure if specifying a PATH in my front matter for each article would conflict with the taxonomy of the same name… also, it will be a little annoying inputting the path for each article so I’d like to avoid that if possible.