Snippets - status?

As of Swift 5.8 they were in there and usable, but only from command-line invocations of Docc, and with fairly non-existent inclusion in Xcode. So the core components are there and in the toolchain with (later) shipped versions of Swift, but they're not super easily accessible or well documented. There's a forum thread from 2022 that which is me poking at it and being confused about status, but in terms of earlier threads there's a decent one with details about using it from @TimTr : Using snippets with Swift-DocC - which most specifically highlights examples of using it in the swift-markdown repo.

Since Xcode 15 and 15.1 beta popped out, I haven't circled back to see if there's any further integration there - I didn't spot or hear of any in the release notes, but I was away for quite a few weeks and missed a bit, so there might be something there, but I'd recommend counting on needing to generate with CLI only at the moment.

2 Likes