Conversation
stivens
marked this pull request as draft
October 2, 2026 17:51
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
All of CaseComplete's documentation lived in one long
README.md. This PR adds a proper site, a landing page plus docs split into pages, in the style of Chimney's docs. It's hosted on GitHub Pages at https://stivens.github.io/CaseComplete/.The library's main selling point is a compile error, so the site is built with mdoc. Every snippet is compiled against the current library, and the error examples (
mdoc:fail) show real compiler output generated at build time. Docs can no longer silently drift from the code.That paid off straight away: the README quick start never compiled. doobie has no
Put[java.time.Year], sofr"release_year = $year"didn't type-check. The examples now useIntyears.What's included
Site (
website/)A => Bfunction compared with aCaseComplete[A, B]parameterwebsite/docs/assets/).website/src/main/scala/examples/movies.scala, so several pages can import them instead of repeating the setup.Build
project/plugins.sbtaddssbt-mdoc2.9.2, which supports sbt 2.build.sbtgets a newdocsproject:casecomplete.jvmand adds doobie for the examples.root's aggregate, sosbt testand MiMa are unchanged.val latestRelease = "1.0.0". It's used both for the MiMa baseline and for@VERSION@in the docs, so the site never advertises a version that isn't on Maven Central yet.CI (
.github/workflows/docs.yml)sbt docs/mdocand thenmkdocs build --stricton PRs and pushes that touchwebsite/,src/main/,build.sbt,project/or the workflow itself. A broken snippet fails the PR.mainupload the site and deploy it to GitHub Pages.ci.yml's key, whichever workflow finished first would decide what's in the cache.README
screenshots/towebsite/docs/assets/.Preview locally
sbt docs/mdoc # or "docs/mdoc --watch" pip install -r website/requirements.txt mkdocs serve -f website/mkdocs.ymlAfter merging
gh api -X POST repos/stivens/CaseComplete/pages -f build_type=workflow). The first deploy fails until this is done.