Use case of taxonomies and sections

I am building a site currently and confused as to how to structure the website. I am going to post competitions, internships, job posts, seminars and other similar things.

I looked up the docs for both of sections and taxonomies and not yet clear as to what limitations could I run into if I arbitrarily choose one over the other. I am currently choosing sections because of one advantage being the better segregation under content folder and a better url structure of the list page

I am confused as to what will suit me better in such a scenario as described above and looking for suggestions ?

Content modeling is not a trivial exercise, and you are wise to spend some time thinking about it before you start building the site.

Hugo infers the content .Type from the first level directory under the content directory. So you could do something like:

β”œβ”€β”€ competitions/
β”œβ”€β”€ internships/
β”œβ”€β”€ job-posts/
└── seminars/

That’s four content types.

But ask yourself these questions:

  • Do I need a different layout for each one?
  • Do I need different front matter variables for each one?

Competitions and seminars are both events. They both have start and stop time values, registration instructions, etc.

Jobs posts and internships are both positions. They both have start dates, qualifications, responsibilities, etc.

Perhaps this would be better:

β”œβ”€β”€ events/
└── positions/

Then you need to figure out how to differentiate a competition from a seminar, and a job posting from an internship. Options (in my highly opinionated order of preference):

  1. Use Hugo’s taxonomy system (example: event_type = ['competition'])
  2. Use a scalar front matter value (example: event_type = 'competition')
  3. Create subsections under events and positions.

I prefer taxonomies because they are built-in, easy to work when creating templates, fast, and accept multiple values (example: event_type = ['competition','code sprint']).

Once you think you have a reasonable content model, create a prototype of the site:


@jmooring 's advice is great.

What I would probably start out with is to model your content coarse grained using sections. And then look at those sections and see if there are some cross-section types; competitions may be a candidate to be a taxonomy that would apply to both internships and seminars (what do I know).


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