Skip to content

Render combined navigation for merged documentation archives #877

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

Merged

Conversation

mportiz08
Copy link
Contributor

@mportiz08 mportiz08 commented Jul 1, 2024

Bug/issue #, if applicable: 124537023

Summary

Now that Swift-DocC can merge multiple documentation archives together into a single archive, it will provide navigator data that includes a combined index for all the pages in the archive. This change updates Swift-DocC-Render to render this combined data for all the pages in the navigator.

Example:

Screenshot 2024-07-09 at 1 12 50 PM

Dependencies

swiftlang/swift-docc#821

Testing

You can use this fixture which combines docs for Inner and Outer modules into a combined My Project archive:
MyCombinedDocs.doccarchive.zip

Steps:

  1. Download/unzip the example MyCombinedDocs.doccarchive.zip fixture and checkout this branch of Swift-DocC-Render
  2. Run VUE_APP_DEV_SERVER_PROXY=/path/to/MyCombinedDocs.doccarchive npm run serve and open http://localhost:8080/documentation
  3. Verify that the top-level page for "My Project" loads at that URL and that the navigator has functional links to both the Inner and Outer docs
  4. Verify that navigation works normally and there are no regressions with routing behavior

Known DocC issue: the breadcrumb link to "My Project" from the getting started article doesn't work due to a bug with the compiler data pointing to the wrong URL (should be /documentation and not /documentation/my-project)

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

@mportiz08
Copy link
Contributor Author

Marking this as a draft PR for the moment after talking with @d-ronnqvist offline. I'll need to make some additional changes to support the situation where multiple modules have been bundled together under a parent module.

@mportiz08 mportiz08 marked this pull request as draft July 3, 2024 22:31
@mportiz08
Copy link
Contributor Author

I've updated the PR description with more up-to-date info and testing instructions. This should be ready now and ended up being simpler than I originally anticipated once I got access to some better fixture data :)

@mportiz08 mportiz08 marked this pull request as ready for review July 9, 2024 20:20
Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it looks great.
Code looks good to me too!

@hqhhuang
Copy link
Contributor

@swift-ci test

@hqhhuang hqhhuang merged commit 0cb8d7e into swiftlang:main Jul 23, 2024
1 check passed
hqhhuang pushed a commit to hqhhuang/swift-docc-render that referenced this pull request Jul 23, 2024
…ng#877) rdar://124537023

Render combined navigation for merged documentation archives (swiftlang#877) rdar://124537023
@steviki steviki mentioned this pull request Sep 17, 2024
2 tasks
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.

3 participants