martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
8.39k stars 289 forks source link

Documentation: Add a Jujutsu Book #1430

Closed PhilipMetzger closed 1 year ago

PhilipMetzger commented 1 year ago

Git has the Git Book and Subversion has the red Book, so it would be appropriate for Jujutsu to have it's own user guide in a book.

The start of this would be adding a MDBook with an introduction but longterm it would be similar to the Git Book.

martinvonz commented 1 year ago

Sounds good.

By the way, as we get ready to test jj on users at Google, we'll need better documentation, so that will probably result in some documentation PRs (but not a whole book).

ilyagr commented 1 year ago

https://github.com/martinvonz/jj/issues/1294 is a related (but different) issue about compiling the docs into the binary. Given a nice website/book, #1294 would be less important, though I think still useful.

ilyagr commented 1 year ago

I made a first attempt to turn the existing docs into a website. From my perspective, the main goal is to have separate pages for prerelease docs and stable version docs, and to have everything be generated automatically from the jj repo.

Here's what it looks like now: https://ilyagr.github.io/jj/

The docs are created by MDBook and a terrible shell script that will probably become a PR once I clean it up a bit: https://github.com/martinvonz/jj/compare/main...ilyagr:jj:mdbook-back. The idea is that the script will run in Github CI and publish to Github Pages on every commit to main. Alternatively, we could just require some manual work on every release.

If we want to have docs for several versions, the best alternatives to a terrible shell script seem to be https://www.sphinx-doc.org/ (which now supports Markdown) and MkDocs + https://github.com/jimporter/mike. Both require installing some Python packages, which I'm still not sure how to do best.

necauqua commented 1 year ago

This is probably far-fetched, but it would be super cool if the examples in codeblocks actually run when generating, so the command output is always up-to-date or is at least tested and fails CI :)

The book looks really nice though :+1: