Complex use of taxonomy or subpage generation?

Hello,

Imagine a movie website with a unique cast of actors for each movies.

/movie/Abandon

  • Starring Anan Apple, and Abel Anderson

/movie/Behold

  • Starring Bebi Bahaca and Barb Bundi

I would like to create a page to view the actors profiles and I’m imagining either:

/movie/Abandon/actors

  • Anan Apple has won an award
  • Abel Anderson is known for TV

or:

/actors/Abandon

  • Anan Apple has won an award
  • Abel Anderson is known for TV

I am familiar with taxonomies and know that they allow you to see the movies that an actor has starred in, however the actors are unique. I know I could have the profiles on the same page, however it would be much better to have a separate page for my use case. Finally, I could create content pages with the profiles, however I actually only need the name of the actor for my use case.

Many thanks, Carlin

Upon sleeping on this, I’ve realised that I can generate the relevant content files for (movie, actors) from my data source and then set the URL in the frontmatter of the page. I think this is the most elegant solution,

I am familiar with taxonomies

Hmmmm…

This EXPLICITLY takes a movie website as example. Have a look :slight_smile:

It’s probably just some confusion with all the terms, taxonomies, termnames and labels like this. Once you are clear with all this structural stuff it should/might be easy to implement all your features. I once thought, “hey let’s do an imdb like site with Hugo” :wink: But time… … it would be a perfect learning opportunity to learn Hugos taxonomy intricacies though.

For a start:

  • if taxonomyname/termname/_index.md exists, it will be taken as content file for the term, so actors/bruce-willis/_index.md will work as his biography
  • your movies are posts (a section).
  • a movie has one page-bundle: content/movies/die-hard
  • a movie has several taxonomies with terms (in die-hard/index.md):
    ---
    actors:
      - bruce willis
      - alan rickman
    director:
      - john mctiernan
    year: 1988
    ... and more
    ---
    
  • from there you go. you add taxonomies, let movie be your “main post type”.

Read the FULL documentation. There are lot’s of features like permalink setup for taxonomies and ranging through frontmatter that will make everything very easy.

Hello, I specifically used the movie metaphor as it is used in the documentation. I can tell you are doubtful of my knowledge, but I am already using three different taxonomies on my website — one of which was such a rare use case that I answered a question here :slight_smile: How to generate a categories.json file? - #6 by carlin . The example you describe will allow pages to be generated with

  • bruce willis:
    • movies: die hard, die harder, etc

However as I explained in the original post I don’t want a taxonomy that uses the actor as a key. I actually still want the movie as a key, but with an extra page being generated with the values.

Honestly, I think that my question has little to do with taxonomies and is more suited to:

  • Sub-page generation for a section
  • Generating multiple pages per content page in a section

I don’t think either of these are Hugo features (yet :slightly_smiling_face:) however I still welcome any thoughts on this problem.

If (in the confines of a “MOVIE”) you stop thinking about taxonomies you have a “section” (movie, actor, director) with subitems (films, names, names).

content/
content/movies/
content/movies/die-hard/
content/actors/
content/actors/alan-rickman/
content/actors/bruce-willis/
content/directors/
content/directors/john-mctiernan/

each of these folders (page bundles) has an index.md with info about it’s subject.

Then let’s cross reference:

die-hard/index.md has a frontmatter:

actors:
- bruce-willis
- alan-rickman
director:
- john-mctiernan
---

that does not need to be a taxonomy, because you can access it via .Params.Actors.Bruce-Willis and such.

actors/bruce-willis/index.md` has the following frontmatter:

---
movies:
- die hard
- die hard 2
- die hard with vengeance
---

Then you group your “items” (movies, actors, directors) in sections and check for "in section actors which item has the directory john-mctiernan" and return that, which will return all actors that worked with mctiernan.

That works. You can define permalinks per section (movies, directors, actors) and interlink.

The problem is, to create this abstract structure BEFORE you start collecting the data.

I think the main problem in this whole abstract thought palace is, that a section is basically a taxonomy and only by the way you are utilizing it and configuring it you define what it becomes.

I would create sections for the “main” “categories” of your structure (probably movies, actors, directors, writers, aso.) and then add a level of taxonomy to it (like tv, movie, series, documentary as taxonomy to movies).

The sad thing is, that we will always end up with IMDB as role model. But that might be a good thing too.

Another thing that might lead to issues is, if bruce-willis the actor starts directing movies. Then you probably will have to introduce a “people” section where content/people/bruce-willis is linked to the one in actors and in directors. Which again leads me to the thought that taxonomies with subfolders might be better, if you don’t want to repeat too much :slight_smile: