sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Add Code docs with jazzy

Open philipphofmann opened this issue 3 years ago • 16 comments

Description

Use https://github.com/realm/jazzy to create code docs similar to, for example, https://alamofire.github.io/Alamofire/. CI should automatically update these.

philipphofmann avatar Oct 13 '22 07:10 philipphofmann

Maybe consider https://developer.apple.com/documentation/docc instead.

philipphofmann avatar Oct 27 '22 13:10 philipphofmann

I can generate API documentation from within Xcode perfectly fine (Product -> Build Documentation), but I can't make it work from the command line, see https://stackoverflow.com/questions/74263875/using-docc-for-an-objective-c-project. Waiting for someone to answer that question and then it should be very quick to close this issue as done :)

kevinrenskers avatar Oct 31 '22 13:10 kevinrenskers

Did you, @kevinrenskers, try the xcodebuild docbuild command, see https://developer.apple.com/documentation/xcode/distributing-documentation-to-external-developers?

philipphofmann avatar Nov 02 '22 19:11 philipphofmann

That only creates the documentation archive, not the rendered website.

kevinrenskers avatar Nov 02 '22 19:11 kevinrenskers

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Nov 24 '22 00:11 github-actions[bot]

Maybe worth checking out @kevinrenskers https://stackoverflow.com/questions/71199393/how-can-i-publish-on-github-using-docc. If using DocC, please consider --enable-inherited-docs, see https://forums.swift.org/t/what-is-the-impact-effect-of-the-enable-inherited-docs-with-docc-convert/53812

philipphofmann avatar Nov 24 '22 16:11 philipphofmann

The problem is that it doesn't seem to work for Obj-C projects.

kevinrenskers avatar Nov 24 '22 16:11 kevinrenskers

Oh now 🙈

philipphofmann avatar Nov 24 '22 16:11 philipphofmann

The DocC documentation compiler converts Markdown-based text into rich documentation for Swift and Objective-C projects, and displays it right in the Xcode documentation window.

https://developer.apple.com/documentation/docc. At least their docs state it should work.

philipphofmann avatar Nov 24 '22 16:11 philipphofmann

Did you look at https://stackoverflow.com/questions/74263875/using-docc-for-an-objective-c-project, which I posted a while ago?

kevinrenskers avatar Nov 24 '22 16:11 kevinrenskers

I'll try it with xcodebuild instead with the --transform-for-static-hosting flag, see if that makes a difference

kevinrenskers avatar Nov 24 '22 16:11 kevinrenskers

https://stackoverflow.com/questions/74263875/using-docc-for-an-objective-c-project

Nope sorry I didn't 😁

philipphofmann avatar Nov 24 '22 17:11 philipphofmann

It sorta works and I have a PR: https://github.com/getsentry/sentry-cocoa/pull/2445. But my recommendation is to probably use Jazzy after all as DocC really works a lot better with Swift projects.

kevinrenskers avatar Nov 24 '22 17:11 kevinrenskers

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Dec 17 '22 00:12 github-actions[bot]

Investigation PR https://github.com/getsentry/sentry-cocoa/pull/2490.

philipphofmann avatar Jan 12 '23 16:01 philipphofmann

Maybe a useful blog post on DocC: https://pspdfkit.com/blog/2024/generating-api-documentation-for-multiple-targets-with-docc/.

philipphofmann avatar May 29 '24 15:05 philipphofmann

We haven't tackled this in a long time. We can either open a PR or another issue when we want to tackle this.

philipphofmann avatar Oct 02 '24 14:10 philipphofmann