Add support for custom scripts#903
Open
Lucca-mito wants to merge 1 commit into
Open
Conversation
3 tasks
7e92625 to
19ac367
Compare
mportiz08
reviewed
Oct 14, 2024
mportiz08
left a comment
Contributor
There was a problem hiding this comment.
Very cool to see this in action, and I know this kind of customization will be super useful to some developers. Nice work!
I'm very interested to hear other feedback from the community on your forums pitch.
Here's some initial feedback on the renderer implementation itself in the meantime.
52940d2 to
44fb72f
Compare
Author
|
@swift-ci test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
First-class support for adding custom scripts to a DocC-generated website. These may be local scripts, in which case the website will continue to work offline, or they may be external scripts at a user-specified URL. This support is in the form of a
custom-scripts.jsonfile, the scripting analog oftheme-settings.json.Full pitch: https://forums.swift.org/t/pitch-support-for-custom-scripts-in-docc/75357.
Dependencies
Corresponding change in swift-docc.
Testing
custom-scripts.jsonand the custommathjax-config.jsscript (shown in the pitch) to your documentation catalog.docc convertthe documentation catalog with your custom scripts. Observe that the modified swift-docc copiedcustom-scripts.jsonand the custom scripts into the documentation archive.Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test, and it succeeded