Broken links using relref with absolute path

Hi guys, not quite sure, if I am doing something wrong or if I’ve experienced a bug with relref and absolute links.

I am running hugo server on my page.

hugo v0.104.2-84cbe724983b4b6153fd39aae0888cbb89a56cda windows/amd64 BuildDate=2022-09-29T10:31:09Z VendorInfo=gohugoio

My site’s repo is https://github.com/McShelby/hugo-theme-relearn/

Significant settings in my config.toml

relativeURLs = false
uglyURLs = false

# only for this example to let hugo generate the page regardless of this error
refLinksErrorLevel = "warning" 

My page structure is basically this

content
├── cont
│   ├── _index.en.md
│   ├── icons.en.md

In content/cont/_index.en.md I’ve put the following links for testing purposes:

[broken]({{% relref "/cont/icons/" %}})
[works]({{% relref "/cont/icons" %}})
[works]({{% relref "./icons/" %}})
[works]({{% relref "./icons" %}})

While the first link is broken and points to the home page, all the others are working and linking to the correct page. Is this expected behavior?

This is looking for a branch bundle (section)

content/
└── cont/
    └── icons/
        ├── foo.md      # {{< relref "/cont/icons/foo" >}}
        └── _index.md   # {{< relref "/cont/icons/" >}}

But isn’t this also looking for a branch bundle?

relref "./icons/"

So why does this work but not the former?

I don’t think it should; I think it should error if the section page does not exist.

Having said that, the need for ref and relref shortcodes has largely, if not completely, been eliminated by the link render hook. So, while you could log an issue, it might not get any attention.

The render-image-hook does only work with pure markdown links like

[Page](/cont/link/)
[Page](./links/)

If relref is used and doesn’t find the link, the render-image-hook will receive destination="/" making it impossible to fix anything.

the need for ref and relref shortcodes has largely, if not completely, been eliminated

Is this written somewhere in the docs? It’s sometimes really hard to find out by the docs which one is the right way.