#50·go

gopages: link to source broken if used with absolute -base

Author: flesserCreated Apr 13, 2023Updated May 22, 2023

When generating a page with gopages -internal -base "https://my-domain/docs/" the links to the source code (e.g. of an func or Type) are broken since that absolute base url is prepended with a ./ in the generated href like this <a href="./https://my-domain/docs/src/pkg/foo/bar.go.html#L42">Foo</a>

Expected:

a href without relative prefix ./ like this: <a href="https://my-domain/docs/src/pkg/foo/bar.go.html#L42">Foo</a>