Skip to content

Fix broken doc links for packages without a version#36

Merged
ericmj merged 1 commit into
mainfrom
fix-selected-package-link-double-slash
Jun 8, 2026
Merged

Fix broken doc links for packages without a version#36
ericmj merged 1 commit into
mainfrom
fix-selected-package-link-double-slash

Conversation

@ericmj

@ericmj ericmj commented Jun 8, 2026

Copy link
Copy Markdown
Member

The selected packages sidebar built each link as
hexdocs_package_url(name) <> "/" <> ver <> "/", which produced a double slash (e.g. mix.hexdocs.pm//) whenever the resolved version was empty, breaking the link.

Introduce hexdocs_package_version_url/2, which omits the version segment when the version is empty and otherwise appends it without a trailing slash.

The selected packages sidebar built each link as
`hexdocs_package_url(name) <> "/" <> ver <> "/"`, which produced a
double slash (e.g. `mix.hexdocs.pm//`) whenever the resolved version was
empty, breaking the link.

Introduce `hexdocs_package_version_url/2`, which omits the version
segment when the version is empty and otherwise appends it without a
trailing slash.
@ericmj ericmj merged commit cdc9cf4 into main Jun 8, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant