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

Navigation through combined modules #1131

Open
AndrewVorobev opened this issue Jan 8, 2025 · 6 comments
Open

Navigation through combined modules #1131

AndrewVorobev opened this issue Jan 8, 2025 · 6 comments
Labels
needs more information Further information is requested

Comments

@AndrewVorobev
Copy link

Feature Name

Navigation through combined modules

Description

Hello!
I am trying to create a combined doccarchive with CLI comman docc merge.
I use it like this

docc merge /path/firstModule /path/secondModule

It merges my modules, but when i try to serve combined .doccarchive from the root directory, i get this error
The page you're looking for can't be found.

Pages with paths like http://localhost/documentation/firstmodule work correctly. So it looks like combining works, but it doesnt generate something like a "entrypoint" or "landing" for easy navigations through the modules.

Maybe I am doing something wrong. If so, please help me to understand how can I achieve desirable functionality. If not, it would be a great feature to have.

Motivation

No response

Importance

No response

Alternatives Considered

No response

@AndrewVorobev AndrewVorobev added the enhancement Improvements or enhancements to existing functionality label Jan 8, 2025
@d-ronnqvist d-ronnqvist added needs more information Further information is requested and removed enhancement Improvements or enhancements to existing functionality labels Jan 15, 2025
@d-ronnqvist
Copy link
Contributor

What URL are you navigating to when you get the "The page you're looking for can't be found"-error?

I would expect there to be a synthesized landing page (support for authoring the landing page content is still in progress) at http://localhost/documentation/

I don't know if you've seen this Swift Forums post yet, but it talks a little about the combined navigation:

The top of the navigation hierarchy, displays the name of this Swift package. Clicking on this element takes you to a minimal synthesized landing page for these targets. The same page can be reached at /documentation.

@AndrewVorobev
Copy link
Author

@d-ronnqvist http://localhost/documentation looks like this. It is a standard page with listing dirs and files provided by http-server (node http-server in that case)

Image

I need to merg multiple doccarchive's into one. Each doccarachive is a documentation of separate framework with its own Package.swift.
What steps i made:

  • create several doccarhives
  • via xcrun docc merge did combine this into one doccarhive.

And after these steps I didn't get anything like a navigation or landing page, i only able to go directly to the documentation, but can't see anything like navigation.
Do you have any example of how should look combined archive? Maybe there is a chance that I am doing something wrong.

@d-ronnqvist
Copy link
Contributor

http://localhost/documentation looks like this. It is a standard page with listing dirs and files provided by http-server (node http-server in that case)

What Swift DocC version / Swift toolchain version are you using?
If you don't know the Swift DocC version you can get the Swift version using swift -version.

@d-ronnqvist
Copy link
Contributor

Do you have any example of how should look combined archive? Maybe there is a chance that I am doing something wrong.

The Swift Forums post from my previous reply has links to a hosted example.

@AndrewVorobev
Copy link
Author

It has an example with structure where are multiple modules but not frameworks (packages).
My request is similar to what https://forums.swift.org/t/a-preview-of-doccs-support-for-combined-documentation/74373/19 author here mentioned.

Anyways, I can't understand the flow and steps, could you help me understand what are the right steps. I use docc merge to combine multiple .doccarchive, your reference shows the different approach. What should I use? Should docc merge works exactly as flag --enable-experimental-combined-documentation from swift package cli command?

@AndrewVorobev
Copy link
Author

I believe my request is connected with this https://forums.swift.org/t/docbuild-and-merge-multiple-docc-catalogs/77013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more information Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants