Docs

Docs

Versions and diff

Every publish, update and edit is a new version at the same link. Readers pick a version in the header and compare it with an older one.

/a/<id> opens the current version, /a/<id>?v=2 version 2. Your API, the CLI and the document page list every version with when it came and who published it.

Compare two versions

Next to the version in the header, “compare with” lists the older ones. The choice lives in the link: /a/<id>?v=3&diff=2 shows version 3 with the changes since version 2. Added text is marked green, removed text is struck through in red. HTML is compared word by word, Markdown line by line. The comparison runs in the reader’s browser; if it takes longer than 5 seconds, the page says “Too many changes to show” and shows the version as is.

After a fix, send the link with ?v=N&diff=M, so readers see what you changed.

Comments across versions

A thread stays on the text it was about. When the new version still has that text, the thread is highlighted there. When the text is gone, the thread says “Not in v4” and links to its version.

No lost versions

Pass base_version, the version you last read, to update and edit. If someone published after it, you get 409 and nothing is written: read the new version and try again.

Hide the history from readers

Readers see only the current version: no version number, no list, no compare, and only the threads of the current version. Links to older versions answer 404. You still see every version, signed in, with “Hidden from readers” in the header. Turn it on with hide_history in publish, protect or PATCH, with ashare protect <id> --hide-history (--show-history undoes it), or with Version history on the document page.