DocC exclude

Can DocC exclude some struct like swiftUI previews?

If you don't add the /// line above the preview struct, it shouldn't appear in doc. Am I missing something ?

Did you find a solution for this? The best I could find was to simply remove it or mark it as private

Sorry, marking it private does ensure it won't appear in the DocC output but it makes it unusable for previewing ... so not a solution. Sorry about that. My only option was to remove them when I no longer needed them.

I think the only feasible solution now would be to do some post-processing on the DocC catalog. It's all JSON and files so painful but possible. Because previews by their nature aren't referenced from other classes and are top-level structures removal would be 1) killing preview files and 2) parsing/updating referencing JSON.

DocC exclude
 
 
Q