How Hugo builds taxonomy page title?

Hi everybody

I use Hugo in building my genealogy site, not for each individual data, but for serving documents or stories about the family.
I use a taxonomy called indivdus in order to link each post to an indivdu, to finally have all the relevant posts for this one.
My syntax is Birth name/first name/spouse name where spouse name is optional…

I build a specific template for the taxonomy (terms.html) in which you have (I want to control the break on family name :

{{ range $cle, $val := .Data.Terms.Alphabetical }}
  {{ $cle}} = {{ .Page.Title}} = {{ $val.Name}} = {{ $val }}<br>
{{ end }}

If in the post, I put in the front matter

individus:
- HAELEWYN/Irma/DEWICKE

in the loop, the result is :

  • .Page.Ttile = HAELEWYN/Irma/DEWCIKE
  • $val.Name = haelewyn/irma/dewicke

If I got 2 individus HAELEWYN/Maria and HAELEWYN/Maria/HAELEWYN (yes, same name for bitrh and spouse), the second one result is :

  • .Page.Ttile = HAELEWYN/Maria
  • $val.Name = haelewyn/maria/haelewyn

I was expecting this result :

  • .Page.Ttile = HAELEWYN/Maria /HAELEWYN
  • $val.Name = haelewyn/maria/haelewyn

Where ami I wrong ?
Thansk in advance

.Page.Ttile and bitrh seem to point to some hastily typed questions. Could you maybe add some files in a demorepo so we can have a look at it?

In general, you can modify taxonomy terms via content/TAXONOMY/TERM/_index.md and add frontmatter there that defines exactly what you wish to appear.

Also, check out the functions title and lower.

I wouldn’t “expect” Hugo to have any understanding of what character case you wish your variables to have. Just sanitize them, prepare them and use what you know will be in there.

But as I wrote… there is not much detail in your question. What is the precise frontmatter that defines these terms? How are the files structured?

Thanks for your reply.

First, apologize for forgetting to give repo access. Hete it is :

In the result, in the Debug part, if you look at the line beginnign by 80 and 81 you have :

80 = HAELEWYN/Maria = haelewyn/maria = {haelewyn/maria [WeightedPage(0,"Albert HAELEWYN") WeightedPage(0,"DESCHILDRE Maria épouse HAELEWYN") WeightedPage(0,"Haelewyn Albert") WeightedPage(0,"Mortuaires de la famille DESCHILDRE")]}
81 = HAELEWYN/Maria = haelewyn/maria/haelewyn = {haelewyn/maria/haelewyn [WeightedPage(0,"Cimetière du Bosc-Renoult") WeightedPage(0,"Cimetière du Bosc-Renoult") WeightedPage(0,"Haelewyn Charles") WeightedPage(0,"Haelewyn Charles")]}

The 80 line looks good.
But for the 81 line I expected

81 = HAELEWYN/Maria/HAELEWYN = haelewyn/maria/haelewyn = {haelewyn/maria/haelewyn [WeightedPage(0,"Cimetière du Bosc-Renoult") WeightedPage(0,"Cimetière du Bosc-Renoult") WeightedPage(0,"Haelewyn Charles") WeightedPage(0,"Haelewyn Charles")]}

The difference is on the second field (delimiter =) : HAELEWYN/Maria/HAELEWYN

Am I missing something ?
Thanks

PS : the purpose of this syntax (birthname/first name/spouse name) is to have an entry with the birth name and display the married name as information. You know Mrs Doe but do you know her birth name ?

Hi

Complement of new tests.

If I use coma (,) instead of slash (/), I get the expected result that is

81 = HAELEWYN,Maria,HAELEWYN = haelewynmariahaelewyn....

Hi

So according to the last tests (coma instead of slash), I will use a different separator between the three informations I want in each item of the taxonomy.

But I’m interested in understanding how Hugo treats the special typos (slash…) in taxonomy items to build PageTitle of the page o the item.
If anybody could point the part of the repo of Hugo, I think I will be able to read the code.

Unless it’s a better way to open an issue ? => I found an issue related : Slashes in a taxonomy term break path resolution · Issue #4090 · gohugoio/hugo · GitHub

Thanks in advance