Anchor links render <baseURL> at leading

Hello. My Hugo version is 0.108, OS is Windows 10 19045.4412.

I use anchor links like following:

Blah blah blah [some title](#anchor-destination)

So, the anchor leads to the header ## some title in the same file.

For some reason, when I build site, it creates link with the href="/<baseurl>/#anchor-destination".
How can I get rid of this <baseurl> part?

I’ve tried also [some title]({{< relref "#anchor-destination" >}}) and ref, but had no success, baseURL is still rendered.

I assume you mean you are getting something like this…

<a href="/posts/post-1/#anchor">anchor</a>

… instead of something like this:

<a href="#anchor">anchor</a>

If that’s correct…

  1. Are you or your theme or a module providing a link render hook?
  2. Why is it a problem?