-
Notifications
You must be signed in to change notification settings - Fork 143
[docs] Add basic documentation on using Snippets to DocC documentation #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
FYI: You can coauthor commits by including a line like this in the commit message:
|
Sources/docc/DocCDocumentation.docc/Reference Syntax/API Reference Syntax/Snippet.md
Show resolved
Hide resolved
@JacobHearst @d-ronnqvist sorry for the delay in writing an overview. Added one based on @d-ronnqvist feedback, see what you think. |
Co-authored-by: Joe Heck <[email protected]> Co-authored-by: Jacob Hearst <[email protected]>
…a newline to the end of the file
…erated symbolgraph with that change
@swift-ci please test |
@swift-ci please tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great! Thank you so much for writing these docs 👏 This is a very cool feature that most people aren't even aware of.
Just a curation issue and another minor tweak please.
Sources/docc/DocCDocumentation.docc/Reference Syntax/API Reference Syntax/Snippet.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Pat Shaughnessy <[email protected]>
Co-authored-by: Pat Shaughnessy <[email protected]>
…ence Syntax/Snippet.md Co-authored-by: Pat Shaughnessy <[email protected]>
Thanks @patshaughnessy - accepted all suggestions and added a commit to rename the file per your suggestion. |
@swift-ci please test |
Hello @heckj - sorry for the delay. I wasn't able to make this work following the instructions in your new article. I suspect that Swift DocC users have to add the Swift DocC Plugin as a dependency in their Package.swift, and then build the docs using the Would you mind updating the article to show how to do this? For example, the article might include details about these steps:
Without all of this information spelled out, I don't know how many readers will be able to use the feature successfully. Let me know if you need help and I can push a draft of what this might look like. |
Thanks for looking @patshaughnessy ! I don't think you strictly need the plugin to do this, but it's certainly easier than wrangling the independent steps of using To my knowledge, this capability hasn't been enabled with Xcode, and is only functional when building and rendering documentation using the Swift Package Manager. The core pieces for building the snippets are part of that project, and generally I do tend to add the swift-docc-plugin to a package when I'm working on such documentation. |
Work towards resolving #417
Summary
Adds some base line documentation that describes how to use the snippets feature built in to DocC and the DocC Plugin.
Dependencies & Testing
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded(this pull request is the combined work of https://github.com/JacobHearst and myself, I just happen to be submitting it)