Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should versioned documentation look like? #4

Open
keynmol opened this issue Apr 21, 2021 · 0 comments
Open

What should versioned documentation look like? #4

keynmol opened this issue Apr 21, 2021 · 0 comments

Comments

@keynmol
Copy link
Contributor

keynmol commented Apr 21, 2021

This is a fun one.

Goals

  1. As a library author (not me lol), I'd like to be able to have my documentation compiled against multiple versions of my project.
  2. I'd like to have a unified UX for switching between versions
  3. I'd like to be able to update and expand documentation for different versions independently.

Approaches

There are several ways of doing it that I know of, and they're orthogonal:

  1. Weaver publishes all of its artifacts from the same branch, and the documentation for each version is built only once.

    • There's an Ammonite script that "freezes" the documentation for previous tag in the separate branch
    • This means that a) documentation for previous versions cannot be expanded (see cats-effect example to see why that's a problem) b) documentation is frozen statically - so whatever version of mdoc generated it at that time, that's what you get
  2. Cats-effect takes a different approach - binary incompatible versions of the library are on separate branches, and so are the .md files for each version

    • This helps tremendously in the cognitive load of just being able to contribute markdown file changes to a branch and they'll be built against the version you have locally
    • The separate docs branch is updated asynchronously using dependabot - submodules point at CE3 and CE2 versions, which can build their markdowns
    • Any changes to documentation (even if they're not version-specific features, such as ecosystem documentation) need to be duplicated
    • There's great flexibility in how the site actually looks - you can structure the versioned parts statically, and only change the compiled markdowns.

Proposed solution

The landscape is changing. As often as the butterflies claps its wings, a new RC of Scala 3 is released, a new CE version emerges from the cocoon and all of that has to have a nice website go with it.

But we can't have nice things.

@keynmol keynmol changed the title What does versioned documentation should look like? What should versioned documentation look like? Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant