Series and taxonomies URL

I am using taxonomies, and I added “series” to taxonomies.
I have three articles with the same series:

the taxonomies config as follows:

baseUrl = "/"
category = "categories"
tag = "tags"
series = "series"

and in the frontmatter I will add

series:
- "my first series"

And at the bottom of the post, I will add a link to the series url as follows:

[Check all articles in this list]({{< ref "/series/my-first-series">}}).  

If I go to the url:

https://www.mywebsite.com/series/my-first-series, I get the series correctly

But on the bottom of the post the url is without the website domain, and the url is just ‘/series/my-first-series/’.

If I changed the baseUrl to : = “https://www.mywebsite.com

Then the generated url for the series at the bottom of the post is:

https://www.mywebsite.com/https://www.mywebsite.com/series/my-first-series

The full Hugo code site is:

The generated hugo output is :

Hugo version?
Please show your entire configuration file please.

A link to your project repo would be very helpful.

Appreciate your help

I added the source code github repo into the question

I am using config folder

Hugo version is

hugo v0.110.0+extended darwin/amd64 BuildDate=unknown

Your theme (puppet) uses a link render hook to intercept and rewrite links:

themes/puppet/layouts/_default/_markup/render-link.html

It is kind of… broken. Options:

  1. Delete the file
  2. Use the relref shortcode instead of the ref shortcode
  3. Modify the render hook by changing this:
{{ .Destination | relURL }}

to this:

{{ .Destination | safeURL }}

I’d go with option 1. Even it weren’t broken, the only thing that is does is add the target="_blank" attribute to the anchor element for external links, which is almost universally detested. I should decide when to open a new tab, not you.

2 Likes

Tons of thanks.
I am still learning all these.
Chose option 1.

2 Likes

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