Problem with upper case and spaces in tags

I think there is a problem with the documentation.

The taxonomy page has an example of producing a list of directors.

The list-page for a director is retrieved via GetPage on the path /directors/$name. The $name is retrieved via a range over Params "directors".

The data given in the example is

directors: [ "Joel Coen", "Ethan Coen" ]

Params will return “Joel Coen”, but the page is actually joel-coen.

Is there a function to transform what Params returns into the page name?

I know something like

replace (lower $tag) " " "-"

will do the trick, but shouldn’t there be a built-in so that if the rules get more complicated?

At the very least, the docs need to be updated to show this.

Am curious, besides joel-cohen, how would you have named the page?

There is a long story here, and I would have improved this situation if it wasn’t so hard without breaking stuff. In short:

  • The taxonomy entries are normalized as map keys to work as paths/URLs
  • So it beomces “directors/ethan-coen”
  • If you set preserveTaxonomyNames=true in site config, you will probably be happier
  • You can also add “directors/ethan-coen/” with the title etc. that you want

My apologies that I wasn’t clear on my concerns.

The fact that the page name gets mangled is fine. However:

  1. The example in the docs as written does not work.

  2. There is no function that mangles the name using the same rules as the core generator.

The ideal state (for me) would be that such a function is added and then the docs updated to use it. do you mean

Ah. That was the one I was overlooking. The example for the function even shows it being used for that purpose.

Thank you.

Would you accept a PR for a doc update for the Taxonomy page I referenced?

Yes please. See for links and practices. :slight_smile: