Skip to content
New issue

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

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

Already on GitHub? # to your account

Ambiguous docs on local inventories #9

Closed
tecosaur opened this issue Jun 5, 2024 · 4 comments
Closed

Ambiguous docs on local inventories #9

tecosaur opened this issue Jun 5, 2024 · 4 comments

Comments

@tecosaur
Copy link

tecosaur commented Jun 5, 2024

Hello!

Looking at the InterLinks docstring (the link in the second paragraph of the readme is broken BTW), it's not clear if

links = InterLinks(
    "project1" => "local/path/to/inv",
)

would work or not. If you could clarify this, that would be great 🙂

This is something I'm interested in since I'm currently restructuring a sextet of related packages of mine into a mono-repo, with each package (and their docs subfolder + inventory) in a subfolder of the main repo.

@goerz
Copy link
Member

goerz commented Jun 5, 2024

No, that cannot work: this would not provide any information about the project root URL (what the URLs in the inventory are relative to).

You have to use

links = InterLinks(
    "project1" => (
       "https://www.docs.org/project1/",
       "local/path/to/inv"
    )
)

I'll make sure to clarify this.

Thanks for pointing out the broken link!

@goerz
Copy link
Member

goerz commented Jun 5, 2024

@tecosaur Have a look at http://juliadocs.org/DocumenterInterLinks.jl/dev/api/internals/#DocumenterInterLinks.InterLinks

Does that updated documentation seem sufficient to make it non-ambiguous?

@tecosaur
Copy link
Author

tecosaur commented Jun 6, 2024

Thanks! That does indeed help, particularly the explanation about how the Julia example works.

I've yet to actually try an @extref, but I'm getting successful builds at least using

InterLinks(
    "DataToolkitCore" => (
        "https://tecosaur.github.io/DataToolkit.jl/core/",
        joinpath(dirname(dirname(@__DIR__)), "Core", "docs", "build", "objects.inv")
    ),
    "DataToolkitREPL" => (
        "https://tecosaur.github.io/DataToolkit.jl/repl/",
        joinpath(dirname(dirname(@__DIR__)), "REPL", "docs", "build", "objects.inv")
    ),
    "DataToolkitStore" => (
        "https://tecosaur.github.io/DataToolkit.jl/store/",
        joinpath(dirname(dirname(@__DIR__)), "Store", "docs", "build", "objects.inv")
    ),
    "DataToolkitCommon" => (
        "https://tecosaur.github.io/DataToolkit.jl/common/",
        joinpath(dirname(dirname(@__DIR__)), "Common", "docs", "build", "objects.inv")
    ),
    "DataToolkitBase" => (
        "https://tecosaur.github.io/DataToolkit.jl/base/",
        joinpath(dirname(dirname(@__DIR__)), "Base", "docs", "build", "objects.inv")
    ),
    "DataToolkit" => (
        "https://tecosaur.github.io/DataToolkit.jl/main/",
        joinpath(dirname(dirname(@__DIR__)), "Main", "docs", "build", "objects.inv")
    ),
)

🙂

@goerz
Copy link
Member

goerz commented Jun 6, 2024

Great! That looks like it should work!

@goerz goerz closed this as completed Jun 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants