Skip to content

Theme like developer.apple.com/documentation #933

@swiftyfinch

Description

@swiftyfinch

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions