Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flesser opened this issue Apr 13, 2023 · 2 comments
Open

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

flesser opened this issue Apr 13, 2023 · 2 comments

Comments

@flesser
Copy link

flesser commented Apr 13, 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>

@JohnStarich
Copy link
Owner

Thank you @flesser for opening. I haven't had a change to try to reproduce / fix, but I'm open to a PR if you're up for it!

@JohnStarich
Copy link
Owner

As a work-around, it should be possible to set the base URL as an absolute path only. e.g. -base /docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants