Add SmithyDocGenTypelevelSitePlugin for sbt-typelevel-site integration#41
Closed
kubukoz wants to merge 2 commits into
Closed
Add SmithyDocGenTypelevelSitePlugin for sbt-typelevel-site integration#41kubukoz wants to merge 2 commits into
kubukoz wants to merge 2 commits into
Conversation
Wires the smithy-docgen output into a Laika site as a sub-page (default mount: /smithy/) so users with sbt-typelevel-site don't have to manage the integration themselves. Lives in a separate sbtTypelevelSitePlugin module so users not on sbt-typelevel-site don't pick up the dependency. The module is sbt 1.x only — sbt-typelevel-site doesn't yet support sbt 2 (tracked at typelevel/sbt-typelevel#872). Default format is plain Format.Markdown so users don't need a Python toolchain. Format.SphinxMarkdown remains opt-in for cleaner rendering. Replaces the SmithyDocGenPlugin's service+format-driven settings with a single smithyDocGenSettings: SettingKey[ObjectNode], default-derived from service+format. Users can override or transform with sbt's normal := and ~= operators. The cache key is the serialized settings node, so service/format/extras collapse into a single hashable input. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extracts the discover+run job-pair pattern (and the matrix-quoting workaround for typelevel/sbt-typelevel#887) into project/ScriptedMatrix.scala so adding a second scripted axis is a single helper call rather than ~30 lines of duplicated YAML config. Adds a scripted-site job pinned to Scala 2.12 (sbtTypelevelSitePlugin is sbt 1.x only) that fans out over sbtTypelevelSitePlugin/src/sbt-test. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member
Author
|
Scope reduced — opening a new PR with just the smithyDocGenSettings refactor and the ScriptedMatrix CI helper. The sbt-typelevel-site integration is being parked: rendering smithy-docgen markdown cleanly inside Laika hit too many edge cases (link rewriting under LinkValidation, anchor casing, smithy-docgen autoBuild bug, etc.) to be worth the complexity right now. |
2 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.
Summary
sbtTypelevelSitePluginmodule providingSmithyDocGenTypelevelSitePlugin, which mounts smithy-docgen output as a Laika sub-page (default/smithy/) in a sbt-typelevel-site projectsmithyDocGenSettings: SettingKey[ObjectNode]onSmithyDocGenPlugin, default-derived from service+format. Users override with:=or~=. Cache key is the serialized settings nodesmithyDocGenOutputDirectory: SettingKey[File]exposed so plugins can reference the output as a setting (needed because Laika'slaikaInputsis a SettingKey and can't.valuea TaskKey)typelevel-site/sample-sitecovering the wiring with plain markdown (no Python required)Notes
Format.Markdownso the integration works without a Python toolchain.Format.SphinxMarkdownremains opt-in for cleaner outputStill TODO before merge
Test plan
🤖 Generated with Claude Code