Re: New permalinks config in 0.115.x - [permalinks.term]

This part is a bit confusing.

[permalinks]
  [permalinks.term]
    tags = '/:slug/'

Since “terms” refer to the value of a given taxonomy (/taxonomy/term/), it gives the impression that [permalinks.term] is for customising taxonomy terms. Something like:

[permalinks]
  [permalinks.term]
    reviews = '/review/:slug/' # domain.tld/categories/review/some-post-here/
    videos = '/:slug/' # domain.tld/tags/some-post-here-2/

Should it not be [permalinks.taxonomy]?

[permalinks]
  [permalinks.taxonomy]
    categories = '/cat/:slug/' # domain.tld/cat/cat1/
    tags = '/tag/:slug/' # domain.tld/tag/tag1/

Combining both:

[permalinks]
  [permalinks.taxonomy]
    categories = '/cat/:slug/' # domain.tld/cat/cat1/
    tags = '/tag/:slug/' # domain.tld/tag/tag1/
  [permalinks.term]
    reviews = '/review/:slug/' # domain.tld/categories/review/some-post-here/
    videos = '/:slug/' # domain.tld/tags/some-post-here-2/

Can give us something like: (just an example why it seems confusing)

Or, am I the only one confused? ^_^;;

You can define taxonomies … like tag, category,... this collects terms in this bag

a taxonomy template is a list template to show all the collected terms

sample

[taxonomies]
    tag                    = "tags"
    serie                  = "series"
#   category NOT used!

in frontmatter you fill terms to the taxonomy

tags        = [ "Hugo", "Security", "CSP"]
series      = ["Hugo", "Security"]

define where to output the taxonomy content (section will be /tags or /series in my example)

[permalinks]
    series                 = "/:section/:slug"   
    tags                   = "/:section/:slug"

the used templates - check this:

HTH

Yes, that’s correct. However, I’m referring to the new permalinks config available in 0.115.x, not the templates. :slight_smile:

However, in the new [permalinks.term] config, as per the docs, it is changing the permalink structure of the taxonomy, not the term.

The old way is:

[permalinks]
categories = "/cat/:slug/"
series = "/series/:slug/"
tags = "/tag/:slug/"

The new way is:

[permalinks.term]
categories = "/cat/:slug/"
series = "/series/:slug/"
tags = "/tag/:slug/"

Is it not more appropriate to use [permalinks.taxonomy] like so?

[permalinks.taxonomy]
categories = "/cat/:slug/"
series = "/series/:slug/"
tags = "/tag/:slug/"

Just like how [permalinks.section] refers to sections; and [permalinks.page] refers to pages.

Anyway, it’s just confusing.

Each URL pattern can target a given language and/or page kind.

You can do this - but you don’t must do this.

1 Like

i just tested and it does modify the term page published path.

no, because permalinks now configured based on page Kind. also permalinks.taxonomy used for modify the taxonomy-kind page.

by relying on page Kind actually makes it more simpler and predictable.

1 Like

It doesn’t work, which makes it … less appropriate.

You currently need some duplication to get where you:

[permalinks.taxonomy]
categories = "/cat/:slug/"
[permalinks.term]
categories = "/cat/:slug/"

I do, however suspect that you would want different values for the above (maybe), but anyhow, the prime motivation with the new setup was to add support section configuration – which I suspect often has a different setup than, say, for regular pages.

2 Likes

Ahh!

Thank you all for the clarifying. Much appreciated. :slight_smile: