Include user provided theme-settings.json
file in compiled output
#339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug/issue #, if applicable: #336
Summary
If a documentation catalog contains a
theme-settings.json
file, DocC will now include this file in the compiled output, alongside the JSON data and static renderer assets.If a default
theme-settings.json
file is already provided by the renderer, the file provided by the catalog will take precedence.This is the minimal DocC implementation work needed to support the proposal described in the Customizing the look and feel of Swift-DocC-Render forum post.
Dependencies
There are no explicit dependencies for this PR since DocC-Render already has some (minimal) support for the presence of this file in the output, however future PRs for DocC-Render will enhance these capabilities and document the supported settings.
Testing
Steps:
cd swift-docc; git apply with-settings.patch
env DOCC_HTML_DIR=$(dirname $(xcrun --find docc))/../share/docc/render bin/preview-docs DocC
¹¹ this env var value will only work if you have a recent Xcode installed, however you can substitute it with a built copy of the renderer in other ways if needed
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded