Commit graph

58 commits

Author SHA1 Message Date
Stephen Jennings
5d732f4344 docs: Add guide for handling divergent changes 2025-08-04 18:59:02 +00:00
Stephen Jennings
d8f2c40152 docs: Rename Configuration documentation section to Reference 2025-07-23 16:38:02 +00:00
Philip Metzger
24e565c8de website: Add the CHANGELOG
This was requested by @lilyball on Discord. I still think we should create a blog longterm
so we can announce stuff and run surveys, but this small step won't block it.
2025-07-17 22:59:58 +00:00
Vincent Ging Ho Yim
67128dd0ed mkdocs: enable linked content tabs
With this enabled, clicking on a content tab will activate all tabs with the same label.
For example, clicking on any `Dynamic` tab on the docs/install-and-setup.md page will
show each shell's command to enable dynamic completions all at once. See [0] for more
details.

[0]: https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#linked-content-tabs
2025-05-23 17:53:30 +00:00
Vincent Ging Ho Yim
5ba4173b45 mkdocs: enable instant loading
This allows text typed into the search box to persist across page navigation, which is
useful when users look up a term but aren't sure on which page they will eventually find
the relevant information. See the [`mkdocs-material` docs][mm-docs] for more
information.

[mm-docs]:
https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#instant-loading
2025-04-23 19:19:25 +00:00
Vincent Ging Ho Yim
1de9cfe540 mkdocs: enable code copy button globally
This makes it easier to try out configs and commands mentioned in the docs.
2025-04-21 23:12:43 +00:00
Vincent Ging Ho Yim
0bb65b9082 mkdocs: enable offline plugin selectively with MKDOCS_OFFLINE environment variable
This removes the need to keep the mkdocs plugins config in sync in a separate
`mkdocs-offline.yml`.
2025-04-21 23:11:21 +00:00
Vincent Ging Ho Yim
7a281a23a6 mkdocs: enable readable anchor links for content tabs
For example, [this URL][1] becomes [this][2].

[1]: https://jj-vcs.github.io/jj/prerelease/contributing/#__tabbed_1_1
[2]: https://jj-vcs.github.io/jj/prerelease/contributing/#macoslinux
2025-04-21 19:18:11 +00:00
Vincent Ging Ho Yim
6a7f72f9fa mkdocs: sort markdown_extensions nodes lexicographically 2025-04-21 19:18:11 +00:00
Vincent Ging Ho Yim
8e15a2634a mkdocs: add table-reader plugin
This is used to render Markdown tables from YAML files.
2025-04-21 00:45:01 +00:00
Vincent Ging Ho Yim
e660846817 mkdocs: sort plugins nodes lexicographically 2025-04-21 00:45:01 +00:00
Vincent Ging Ho Yim
b9f83261db mkdocs: add 'Style guide' to nav sidebar 2025-04-21 00:38:01 +00:00
Winter
001b6df26c docs: add edit link to pages
This leads users directly to GitHub's edit page for the page they're viewing.
2025-04-16 18:30:34 +00:00
Winter
96694a6891 docs: add GitHub repo link to header 2025-04-16 18:30:34 +00:00
Philip Metzger
1b7fda946e docs: Add Jujutsu's Developers core values
This was taken out of the "Jujutsu from first principles" doc in another PR. It represents some of the common ideas
which the project had around a year ago.

I think this can be modernized if the maintainers want it.
2025-04-07 13:44:02 +00:00
Vincent Ging Ho Yim
0cd352e16a mkdocs: rename docs page name for 'Sapling comparison' for consistency with 'Git comparison' 2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
73e87bcf65 mkdocs: use sentence case consistently for docs page names 2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
53e8218dca mkdocs: remove quotes surrounding docs page names in YAML fields
This avoids having to escape double and single quotes used within page names. One page has double quotes in its name in the current state, and another will have a single quote in its name in the next commit.
2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
2c76054136 mkdocs: use single quotes consistently in YAML values
I don't have a preference for single vs double quotes, but currently `mkdocs.yml` mostly uses single quotes for YAML values.
2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
2eb1d5b3e4 mkdocs: standardise indentation 2025-03-29 05:02:38 +00:00
Ilya Grigoriev
02e2f06e7a mkdocs: Suppress a warning that paid_contibutors.md is not in nav
The warning this suppresses is shown by `mkdocs serve`:

```
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
             - paid_contributors.md
```

We can alternatively add that doc to nav.
2025-03-04 20:00:12 +00:00
Austin Seipp
02500e5248 meta: add initial GOVERNANCE.md
This is the result of a lot of back and forth, the weekly efforts of the
governance working group, consisting of:

- Martin von Zweigbergk (martinvonz)
- Waleed Khan (arxanas)
- Emily Shaffer (nasamuffin)
- Austin Seipp (thoughtpolice; yours truly)

Many thanks as well to emeritus member Khionu Sybiern, who helped kickstart this
whole process.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-02-10 17:39:34 +00:00
Martin von Zweigbergk
65dc6750e0 docs: move Git command table to a separate page
The table can be easy to miss in its current location.
2025-02-10 15:29:32 +00:00
Ilya Grigoriev
cc5b34809c docs: label prerelease docs with different title and header color
This makes the pre-release header bar into a steely blue-grey color and
changes its label, while the header for the stable docs (and past
release docs) remains indigo (blue). The goal is to make it easier to
tell prerelease docs and regular docs apart with a glance. I also
considered using a favicon with a different background, but perhaps
that's not as useful as changing the header color.

See https://github.com/jj-vcs/jj/pull/5614 for screenshots and
https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#primary-color
for some more possibilities. "Deep purple" or "brown" are the closest
runners up to "blue grey" in my mind.

This can be tested with

```
MKDOCS_PRIMARY_COLOR="blue grey" MKDOCS_SITE_NAME="Jujutsu docs (prerelease)" uv run mkdocs serve
```

-----------

We could also want to make the historical versions more easily
distinguishable from the `latest` docs, but that would be more
difficult. We'd either need to rely on javascript or to rebuild the
*previous* version of the docs in addition to the new one on every
release.

See [mkdocs-material banner docs] for a javascript apporach (which would
still need some care in implementing, since we probably want the
prerelease version to either not have a banner or to have a different
banner).

[mkdocs-material banner docs]:
  https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/?h=version#version-warning
2025-02-07 20:44:59 +00:00
Ilya Grigoriev
f543d24244 mkdocs: get rid of SITE_URL_FOR_MKDOCS
The bug that made it somewhat useful is hopefully fixed now. I
documented the issue in case it reappears.
2025-02-07 20:44:59 +00:00
Martin von Zweigbergk
f67373368e docs: describe how to do a release 2025-02-04 22:05:24 -08:00
Martin von Zweigbergk
b3099b7b67 docs: add new logo as favicon 2025-02-01 22:43:55 +00:00
Martin von Zweigbergk
b836e0ae95 docs/cli: update URLs to from martinvonz user to jj-vcs org
We just migrated to the jj-vcs GitHub org, so we should point to the
new GitHub URLs.
2024-12-17 12:44:44 -08:00
Philip Metzger
eb91547e52 docs: Make the Roadmap a toplevel website entry
This also fixes the Xethub link, by pointing it to the web archive, which no longer is available.
2024-11-16 11:11:59 +01:00
Ilya Grigoriev
1c397b5d1b docs website & mkdocs.yml: redirect /branches/ URL
After this is merged, https://martinvonz.github.io/jj/prerelease/branches/
should redirect to https://martinvonz.github.io/jj/prerelease/bookmarks/
instead of resulting in a 404 error and old links to docs
(from posts or from Google index) breaking.
2024-09-16 16:44:31 -07:00
Emily Shaffer
5aa6fa5974 docs: introduce temporary governance voting process
In order for the governance working group to make progress establishing
jj's governance structure, we need the approval of the jj community.

Set up a temporary voting process to get that approval.

Additionally, set up a governance dir for other governance-related
documentation to sit in.

Later, when we have a permanent governance structure and enough policy
to let the community make changes without needing the governance working
group, we can delete this document.
2024-09-12 15:19:46 -07:00
Philip Metzger
d9c68e08b1 everything: Rename branches to bookmarks
Jujutsu's branches do not behave like Git branches, which is a major
hurdle for people adopting it from Git. They rather behave like
Mercurial's (hg) bookmarks. 

We've had multiple discussions about it in the last ~1.5 years about this rename in the Discord, 
where multiple people agreed that this _false_ familiarity does not help anyone. Initially we were 
reluctant to do it but overtime, more and more users agreed that `bookmark` was a better for name 
the current mechanism. This may be hard break for current `jj branch` users, but it will immensly 
help Jujutsu's future, by defining it as our first own term. The `[experimental-moving-branches]` 
config option is currently left alone, to force not another large config update for
users, since the last time this happened was when `jj log -T show` was removed, which immediately 
resulted in breaking users and introduced soft deprecations.

This name change will also make it easier to introduce Topics (#3402) as _topological branches_ 
with a easier model. 

This was mostly done via LSP, ripgrep and sed and a whole bunch of manual changes either from
me being lazy or thankfully pointed out by reviewers.
2024-09-11 18:54:45 +02:00
Ilya Grigoriev
7ec0b59714 docs roadmap: add to list of all docs
This avoids an MkDocs warning.

I put it into Design Docs, since people who follow the link to the
roadmap might be interested in those.

It's not a perfect place for it, but it seems better than "Technical
Details" or "Contributing" (which might make people think that they have
to read or follow the roadmap before contributing).
2024-09-04 20:05:52 -07:00
Vincent Ging Ho Yim
2e3b4b5fe3 docs: add copy tracking design doc to MkDocs
Missed in #3574.
2024-07-19 22:00:09 +02:00
Philip Metzger
3b2197c74a docs: Add a Design Doc blueprint.
This should be the template for all new Design Docs, minor deviations aside.
Hopefully this makes the process a bit easier.
2024-06-30 15:37:40 +02:00
Philip Metzger
c4777e4721 docs: Formalize our design docs process a bit.
This adds the basic outline of _when_ a Design Doc should be written. See the next
commit in the stack for the blueprint. 

By adding this we hopefully can prevent unnecessary churn from new and longtime contributors, 
when they want to add a major feature or rewrite a core part of Jujutsu. The text is written
as a guideline, not a rule.
2024-06-30 15:37:40 +02:00
Martin von Zweigbergk
31b8f07fa0 docs: hyphenate "community-built" 2024-06-20 05:34:02 +09:00
Philip Metzger
30f54862dd docs: Add a page for community built tools.
Thank you all for building tools around it.
2024-06-17 19:47:13 +02:00
Ilya Grigoriev
864869abd5 docs: set canonical_version to latest
Currently, https://www.google.com/search?q=jj+revsets has problematic
results, one of the top links for me is
https://martinvonz.github.io/jj/v0.14.0/github/ (we are currently on
v0.17.1).

I hope this will help them all point to `latest` instead.
2024-05-21 16:19:04 -07:00
Ilya Grigoriev
ff810c6097 docs: show version alias in version selector
See https://github.com/martinvonz/jj/pull/3723 for a screenshot.

This will make it clearer to the users that the "latest" and "v0.??.?"
are the same even if the former does not redirect to the latter (but has
identical contents).

MkDocs material lists the *first* alias for each version, so I also
added a "nightly" alias for "prerelease". Otherwise, users would see the
"main" alias, and might get confused whether they should use "latest" or
"main" docs if they don't realize it's named after the "main" branch.

(Upon testing, it still shows "main" for now, but it should be possible
to fix this after this PR is merged by reordering the aliases directly
in `versions.json` on the gh-pages branch)
2024-05-21 16:19:04 -07:00
Ilya Grigoriev
c9b44f3828 docs: ask MkDocs to fail on links to non-existent sections
This also requires anchors to be lower-cased: https://github.com/mkdocs/mkdocs/issues/3703
2024-05-14 13:14:27 -07:00
Yuya Nishihara
850887cf09 fileset: add basic pattern parsing functions
Naming convention is described in FilePattern::from_str_kind(). It's based
on Mercurial's pattern prefixes, but hopefully fixes some inconsistencies.
https://github.com/martinvonz/jj/issues/2915#issuecomment-1956401114

#3239
2024-04-07 19:43:29 +09:00
Philip Metzger
5b0ef324d1 docs: Add a Testmonials page.
Show our positive reviews to the world. It's also not completly serious, in a similar fashion to
Phabricator.

Co-Authored-By: Austin Seipp <aseipp@pobox.com>
2024-02-25 14:20:33 +01:00
Ilya Grigoriev
44e1d4a72d docs: fix a bug with offline docs generation
This is a rather annoying bug. It was revealed because CLI reference stopped
working for *offline* docs after the previous commit. Turns out, none of the
plugins we enabled for normal docs were turned on in `mkdocs-offline.yml`.

Thanks to @mondeja for figuring out what was going on.

In the future, we could try a less ugly fix, e.g. turning the `offline` plugin
on or off via an environment variable.

See also:
https://github.com/squidfunk/mkdocs-material/issues/6749
https://github.com/mondeja/mkdocs-include-markdown-plugin/issues/195#issuecomment-1933085478
2024-02-12 10:28:09 -08:00
Ilya Grigoriev
b170988a46 poetry: add the include-markdown MkDocs plugin 2024-02-12 10:28:09 -08:00
Daniel Ploch
01825953ac sparse-v2: design doc proposition for Sparse Patterns refactoring
Kicks off work on issue #1896
2024-02-01 16:02:14 -08:00
Ilya Grigoriev
52c415eaf4 docs: store output of jj util markdown-help, render it on the website
I am using a very hacky approach, using `insta` to generate the markdown help.
This is based on a lucky coincidence that `insta` chose to use a header
format for snapshot files that MkDocs interprets as a Markdown header (and
ignores).

I considered several other approaches, but I couldn't resist the facts that:

- This doesn't require new developers to install any extra tools or run any
extra commands.
- There is no need for a new CI check.
- There is no need to compile `jj` in the "Make HTML docs" GitHub action,
  which is currently very fast and cheap.

Downside: I'm not sure how well MkDocs will work on Windows, unless the
developer explicitly enables symbolic links (which IIUC is not trivial).

### Possible alternatives 

My next favorite approaches (which we could switch to later) would be:

#### `xtask`

Set up a CI check and a  [Cargo `xtask`]  so that `cargo xtask cli-help-to-md`
essentially runs `cargo run -- util markdown-help > docs/cli-reference.md` from
the project root.

Every developer would have to know to run `cargo xtask cli-help-to-md` if
they change the help text.

Eventually, we could have `cargo xtask preflight` that runs `cargo +nightly
fmt; cargo xtask cli-help-to-md; cargo nextest run`, or `cargo insta`.

#### Only generate markdown for CLI help when building the website, don't track it in Git.

I think that having the file in the repo will be nice to preview changes to
docs, and it'll allow people to consult the file on GitHub or in their repo.

The (currently) very fast job of building the website would now require
installing Rust and building `jj`. 

#### Same as the `xtask`, but use a shell script instead of an `xtask`

An `xtask` might seem like overkill, since it's Rust instead of a shell script.
However, I don't want this to be a shell script so that new contributors on
Windows can still easily run it ( since this will be necessary for the CI to
pass) without us having to support a batch file.

#### Cargo Alias

My first attempt was to set up a [cargo alias] to run this, but that doesn't
support redirection (so I had to change the `jj util` command to output to a
file) and, worse, is incapable of executing the command *in the project root*
regardless of where in the project the current directory is. Again, this seems
to be too inconvenient for a command that every new PR author would have to run
to pass CI.

Overall, this just seems a bit ugly. I did file
https://github.com/rust-lang/cargo/issues/13348, I'm not really sure that was
worthwhile, though.

**Aside:** For reference, the alias was:
    
```toml
# .cargo/config.toml
alias.gen-cli-reference = "run -p jj-cli -- util markdown-help docs/cli-reference.md"
```

### Non-alternatives 

#### Clap's new feature

`clap` recently obtained a similarly-sounding feature in
https://github.com/clap-rs/clap/pull/5206. However, it only prints short help
for subcommands and can't be triggered by an option AFAICT, so it won't help us
too much.

[Cargo `xtask`]: https://github.com/matklad/cargo-xtask
[cargo alias]: https://doc.rust-lang.org/cargo/reference/config.html#alias
2024-01-30 14:58:32 -08:00
Stephen Jennings
b2800f7f44 docs: add notes for Windows users 2024-01-29 12:16:15 -08:00
Philip Metzger
e79fd2e81c docs: Make the website's theme adjustable.
The website will also adjust to the system default theme now. 
I mostly did this because I am a darkkmode user and we didn't provide it yet.
2024-01-07 22:07:24 +01:00
Carlos Precioso
5568ca81c6 docs: add mermaid plugin for diagrams 2023-11-22 10:38:57 -08:00