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

Theme like developer.apple.com/documentation #1002

Open
swiftyfinch opened this issue Aug 4, 2024 · 0 comments
Open

Theme like developer.apple.com/documentation #1002

swiftyfinch opened this issue Aug 4, 2024 · 0 comments
Labels
enhancement Improvements or enhancements to existing functionality

Comments

@swiftyfinch
Copy link

swiftyfinch commented Aug 4, 2024

Feature Name

Apple Official Theme

Description

Hello everyone!

I have an idea to customise the current theme of DocC in the style of the official Apple website.
In my opinion, it looks nicer and is more consistent with official documentation.
It would be great if we had such an ability and some documentation describing how to do it.

I've learned about https://github.com/swiftlang/swift-docc/blob/main/Sources/SwiftDocC/SwiftDocC.docc/Resources/ThemeSettings.spec.json and tried to replace the icons.

{
  "theme": {
    "icons": {
      "single-letter": "/images/single-letter.svg",
      "link": "/images/link.svg"
    }
  }
}

I managed to replace some of them, but I can't understand how to replace the symbols and link icons.
It looks like I can't do it.

  • I can't find the link icon in the spec and didn't manage to figure it out on my own:
    class="svg-icon link-icon icon"
    Screenshot 2024-08-04 at 14 40 11
    Screenshot 2024-08-04 at 14 41 10

  • And I can't understand how to replace symbols such as class, structure, enum, etc. I can only replace them with a single icon by id: "single-letter" in the svg icon.
    Screenshot 2024-08-04 at 14 43 43
    Screenshot 2024-08-04 at 14 44 20

Could you help me to highlight how to do it?
Or maybe it needs to implement some improvements here.
And what do you think about describing a separate theme like an Official Apple site one?

Motivation

In my opinion, it looks nicer and is more consistent with official documentation.

Importance

On the one hand, appearance is not super important, but it is a valuable thing, because we have to read a lot of documentation, and it would be better to do so in the same way.

Alternatives Considered

I think that we need at least a few more instruments to implement the official theme.


Updated:

@swiftyfinch swiftyfinch added the enhancement Improvements or enhancements to existing functionality label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements or enhancements to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant