Stripping View implementations from generated docs

Hi,

at my company we have a design system that was implemented as a SwiftUI library for iOS. We decided to use Docc for documentation. A static copy of the documentation is made available via GitHub pages. We use xcodebuild docbuild to generate the docs and docc process-archive transform-for-static-hosting to prepare them for hosting. The resulting folder is than published on a disconnected gh-pages branch in the design systems repository. So far so good.

The issue that we have is that the resulting page is quite large. For each type that conforms to SwiftUI.View we have a view-implementation.json (1.4M) that contains the full documentation of SwiftUI.View which has a rather large API surface. The index.json is around 6M.

Now, my question is the following: Is there a way to exclude the parts of the documentation that is already covered by SwiftUI or can the documentation be scoped down to a specific library or package?

Thanks in advance.

1 Like