Skip to content

Keep external links to non-symbols in generated See Also sections #788

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

d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Jan 5, 2024

Bug/issue #, if applicable: rdar://116540790

Summary

Fix a bug where only links to external symbols were included in the generated See Also sections.

Dependencies

None

Testing

This can be tested using bin/test-data-external-resolver as an external resolver:

  1. Set DOCC_LINK_RESOLVER_EXECUTABLE to the test-data-external-resolver path
  2. Set DOCC_HTML_DIR to swift-docc-render-artifact checkout path (/path/to/swift-docc-render-artifact/dist)
  3. In a documentation catalog that curates some local page somewhere, also curate an external link <doc://com.test.bundle/something>

For example, with an Article.md file in Something.docc:

# Article

An article.

and a Root.md file:

# Root

@Metadata {
  @TechnologyRoot
}

Curate a local article and an external link

## Topics

- <doc:Article>
- <doc://com.test.bundle/something>
  1. Build the documentation
swift run docc preview path/to/Something.docc
  1. Preview the curated page. It should display the external link in a generated See Also section

Checklist

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

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • [ ] Updated documentation if necessary

Copy link
Contributor

@patshaughnessy patshaughnessy left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist merged commit 942c249 into swiftlang:main Jan 11, 2024
@d-ronnqvist d-ronnqvist deleted the external-links-in-see-also-section branch January 11, 2024 10:24
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.

2 participants