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

publicPath does not work with URL #688

Open
f0x52 opened this issue Sep 22, 2024 · 2 comments
Open

publicPath does not work with URL #688

f0x52 opened this issue Sep 22, 2024 · 2 comments
Labels
bug Issue raised as a bug.

Comments

@f0x52
Copy link

f0x52 commented Sep 22, 2024

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

When configuring publicPath with an url (like the docs suggest), the internal call to path.resolve() normalizes the // in the http(s):// protocol bit to just /, resulting in broken links

[Reference](https:/example.com/README.md#reference)

I think #621 was about the same problem

TypeDoc configuration

{
  "publicPath": "https://example.com"
}

Expected behavior

Currently publicPath has the correct behavior for setting a path prefix, but should preserve the protocol when a full URL is given

@f0x52 f0x52 added the bug Issue raised as a bug. label Sep 22, 2024
@f0x52
Copy link
Author

f0x52 commented Sep 22, 2024

Typedoc also has options for hostedBaseUrl and useHostedBaseUrlForAbsoluteLinks but I believe those are never used for markdown output?

@tgreyuk
Copy link
Member

tgreyuk commented Sep 22, 2024

Thankss. This should be fixed in typedoc-plugin-markdown@4.2.8

Typedoc also has options for hostedBaseUrl and useHostedBaseUrlForAbsoluteLinks but I believe those are never used for markdown output?

This is correct. These options were introduced after the publicPath plugin option was implemented. I have considered supporting but I think the single option is more simplistic. Have updated the docs to reflect this.

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

No branches or pull requests

2 participants