SwiftDocOrg / swift-doc

A documentation generator for Swift projects
https://swiftdoc.org
MIT License
1.68k stars 100 forks source link

Expose deeplinks. #275

Closed Lukas-Stuehrk closed 3 years ago

Lukas-Stuehrk commented 3 years ago

This change adds links to the name of all members, so it's easy to copy the direct link. This implements #110.

I chose a different approach than adding a chain symbol when hovering the name. The entire name is a link. This leads to some visual changes in the generated documentation. I can change this behavior to the behavior described in the original issue if wanted.

Before the changes:

Screenshot 2021-05-08 at 00 12 21

After the changes when the entire name becomes the link to the anchor:

Screenshot 2021-05-08 at 00 12 59
mattt commented 3 years ago

This is a nice change, @Lukas-Stuehrk!

Before we merge this in, I'd like to give this a quick once-over to get the design a bit closer to what I had in mind with https://github.com/SwiftDocOrg/swift-doc/issues/110#issuecomment-627536084.

Lukas-Stuehrk commented 3 years ago

Thanks! 🙇

Initially, I wanted to build the version as described in #110 and had the current solution as intermediate step. But then I liked the visuals so much that I decided to keep it and go with this solution. I think it looks great and matches the visual language of the index page.