Theme like developer.apple.com/documentation

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 swift-docc/Sources/SwiftDocC/SwiftDocC.docc/Resources/ThemeSettings.spec.json at main · swiftlang/swift-docc · GitHub 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?

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.

I'm new to this platform. Therefore, I initially opened a feature request:

1 Like