swiftlang / swift-docc

Documentation compiler that produces rich API reference documentation and interactive tutorials for your Swift framework or package.
https://swift.org/documentation/docc
Apache License 2.0
1.16k stars 123 forks source link

External link arrrow #481

Open a-docc-user opened 1 year ago

a-docc-user commented 1 year ago

Feature Name

Special symbol for external link.

Description

Put a little arrow in a square icon next to every external link, but only in the See Also section to avoid cluttering up the text, like following:

link aa

Motivation

Make people not be surprised when they press a link in SeeAlso in xCode that looks just like all the others but when they press on it it opens a Web Browser.

Importance

Make people not be surprised when they press a link in SeeAlso in xCode that looks just like all the others but when they press on it it opens a Web Browser.

Alternatives Considered

d-ronnqvist commented 1 year ago

Hi. Thank you for reporting this issue.

Any Xcode specific bug or enhancements are out-of-scope for the Swift-DocC GitHub issues. For those, please report a feedback.

Instead, I'll focus on this issue as it applies to hosted DocC documentation.


As far as I know it's not very common for webpages to make a distinction between external links and non-external links. There could also be more than one definition of what is an "external link". For example:

For example, the SwiftUI App documentation links to the @main attribute from the Swift Programing Language reference. By all the above definitions that's an "external link" but I personally find that calling attention to that in the App documentation isn't all that necessary.

At the very least I could see that different people may have different opinions about what's an external link and whether or not they should have some sort of indication. This would almost certainly mean some sort of opt-in configuration for the documentation author.