How do I assign proper titles and other data to sections?

I have set up in my blog to have 4 sections:

  1. /content/projects/
  2. /content/process/
  3. /content/randd/
  4. /content/misc/

I’d like to assign proper longer names to these sections, so that on the page, it won’t be “randd” like when I use {{ .Section }}. The nicer human-readable names may be longer than the short names I have above.

I also want to have a short description associated with each section so I can call it in section list page.

Any suggestions on how to do these?

Edit: So, I followed the tips in this post, however, I’m not sure how to generically pass the variables. Here’s what I’ve done.

Any reference to a section is now like this:
Topic: <a href="/{{.Section}}/">{{.Section}}</a>

I created a toml file in data directory (\data\sections.toml) where I have the following, for example:
[randd]
title="Research and Development"
description="Lorem ipsum R and D."

The code, for just “randd” then becomes:
Topic: <a href="/randd/">{{.Site.Data.sections.randd.title}}</a>

How do I genericize this so that it will be something like this?
Topic: <a href="/{{.Section}}/">{{.Site.Data.sections.[.Section].title}}</a>

Thanks.

{{  (index .Site.Data.sections .Section).title}}

Thank you!

Apologies for resurrecting such an old topic but I believe it’s better for the continuity rather than creating a new one.

I was looking for a way to do pretty much the same as OP so I created my data/sections.toml with just:

[videos]
title="Videos"

But when I tried to use what you posted, @bep, the whole server crashed o.O

Stopping at {{ (index .Site.Data.sections .Section) }} I see map[title:Videos] but I can’t access the title entry. Windows’ Command Prompt is awful to extract text from so I’ll attach the whole window.

I tested with Hugo 0.23 and the latest one. Same results on both.

Is it something quickly solveable from here or should I open a formal issue?

Why not simply declare your Section Title in an _index.md?

If this replicates to deeper levels it would be nice, but I’m not sure how to do it.

Currently I’ve implemented a whole i18n solution as counter-measure. It may look like I’m killing an ant with a cannon ball but, obviously, I won’t use it just for that.

Thanks for all responses !