Repository navigation
docs: generate the SDK reference as Markdown with Dokka - #123
Merged
Merged
Conversation
Adds Dokka (docs only, nothing published), a script that groups the KDoc by sdk-specs capability into references/, and a best-effort release step that regenerates the pages in the version bump commit. generate-references.yml retries it by hand. A root MIGRATION.md becomes the migration page, titled with its H1.
|
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 53b1ef6: 3 Should fix.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
dustinbyrne
approved these changes
Nov 12, 2026
turnipdabeets
added a commit
that referenced
this pull request
Nov 13, 2026
The reference generator from #123 stops on any PostHog member that docs/capabilities.json doesn't map, so the release's reference step would fail on captureAi, onFeatureFlags, registerOptions, unregisterOptions, setAppLanguage and the four *PropertiesForFlags functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 15 tasks
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.
💡 Motivation and Context
Closes #122.
posthog-kmp has no generated SDK reference, unlike Android, iOS, Flutter, Python, Go, Rust and posthog-js. The KMP docs page on posthog.com documents the config by hand, so it drifts with each release. This generates the reference from KDoc, the same way posthog-android#939 does with Dokka.
posthog-kmpmodule. Nothing new is published: the javadoc jar staysJavadocJar.Empty().scripts/generate_markdown.pyturns that HTML intoreferences/posthog-kmp-0.mdandreferences/posthog-kmp-reference.md. It groupsPostHog.*methods by sdk-specs capability, usingdocs/capabilities.json. The run fails on an unmapped method or a stale entry. For an expect/actual declaration whose signature differs by platform (PostHogContext), the page shows the common signature, then the platform's.MIGRATION.mdexists, the script writesreferences/posthog-kmp-migration.mdand uses the guide's H1 as the page title, like posthog-ios#1060, posthog-android#972, posthog-flutter#725 and posthog-js#5697. KMP has no migration guide yet, so nothing is generated today.Releaseenvironment. A cleanup step then drops anything else Gradle touched, so only the release candidate and the pages are committed.generate-references.ymlreruns the step by hand. It runs on ubuntu: generating with the Apple source sets turned off gave byte-identical pages, because they add nothing the common API doesn't already document.posthog.com still has to pick up
posthog-kmpbefore/docs/references/posthog-kmpshows up.💚 How did you test it?
sdk-specsmain and read through the generated pages.references/,git statuswas clean.actionlintpasses on both workflows.📝 Checklist
🤖 Agent context
Human-driven (agent-assisted)
🤖 Generated with Claude Code