I noticed that ex_doc generates wrong links for private packages belonging to organizations.
For example, if I have package linking to module Foo, which belongs to the package :foo, and :foo belongs to the organization my-org the automatic link will be hexdocs.pm/foo/Foo instead of my-org.hexdocs.pm/foo/Foo. Naturally, this link will be broken.
I traced the link generation to here:
|
defp get_deps do |
|
for {key, _} <- Mix.Project.deps_paths(), |
|
_ = Application.load(key), |
|
vsn = Application.spec(key, :vsn) do |
|
{key, "https://hexdocs.pm/#{key}/#{vsn}/"} |
|
end |
As you can see, it doesn't consider whether the package belongs to an organization or not.
I tried to fix it, but didn't find any API to find to which organization a package belongs to.
@wojtekmach suggested usings the :deps option for ex_doc to point the correct dependency documentation urls. While this works, it's a big burden to maintain, and I think this could be solved in a simple and more correct way at ex_doc.
I noticed that ex_doc generates wrong links for private packages belonging to organizations.
For example, if I have package linking to module
Foo, which belongs to the package:foo, and:foobelongs to the organizationmy-orgthe automatic link will be hexdocs.pm/foo/Foo instead of my-org.hexdocs.pm/foo/Foo. Naturally, this link will be broken.I traced the link generation to here:
ex_doc/lib/mix/tasks/docs.ex
Lines 534 to 539 in d8146c3
As you can see, it doesn't consider whether the package belongs to an organization or not.
I tried to fix it, but didn't find any API to find to which organization a package belongs to.
@wojtekmach suggested usings the
:depsoption forex_docto point the correct dependency documentation urls. While this works, it's a big burden to maintain, and I think this could be solved in a simple and more correct way at ex_doc.