Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Dec 5, 2025

Bug/issue #, if applicable: rdar://163326857

Summary

This is the 1st (of probably 2) integration slices of #1366

This PR adds a new HTMLRenderer that can render articles and symbols into HTMLRenderer/RenderedPageInfo.

In order to access information about resolved pages, resolved assets, etc. it uses a private ContextLinkProvider that conforms to the LinkProvider protocol in DocCHTML.

This PR also adds a new HTMLContentConsumer protocol and a concrete FileWritingHTMLContentConsumer implementation that embeds the per-page HTML content inside of the <noscript> tag of the index.html file that DocC would normally make an exact copy of for each page.

The main integration of these new types happen in the ConvertActionConsumer. If it is passed an HTMLContentConsumer it will create a HTMLRenderer for each DocumentationNode that it processes. This means that the output is both a JSON file with content and and HTML file with content.

Notably missing from this PR is:

Dependencies

None.

Testing

Nothing in particular for this PR. It intentionally lacks the CLI feature flag that would allow this to be used in docc convert. See #1366 for how it eventually does get used.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant