A `!` now means force or everything and nothing else (`:w!`, `:search!`, `:export!`, `:logout!`). A command that did a second thing behind its bang takes a word for it instead: `:space new|name|rm`, `:list name|rm`, `:task [add]|edit`, `:upload seal`, `:import zip [/]`. `:card` while reading a document makes a card about it, so `:card!` is gone. Merged: `:export` downloads what has focus, a file as it is or a document as markdown (`:download` folded in); `:share [off|new]` replaces `:unshare` and `:link`, and the list's `s` and `y` give way to it and the info sheet; `:noh` replaces `:clear`; `:vault [unlock|lock|passwd]` replaces `:unlock`, `:lock` and `:passwd`; Esc in the list puts down what `m` picked up before it closes the document, replacing `:unmark`. The old spellings run as their new lines for one release through a table in commands.ts; help and Tab leave them out, and the wiki lists them. A settings sheet (`,` or `:settings`) holds the options, the vault, the backup, the signed-in browsers, ssh keys and capture tokens. Each row runs the command a line would. Bare `:set`, `:vault`, `:backup`, `:sessions`, `:sshkey` and `:token` open it at their part. `?` shows the keys and commands to start with, flagged in the keymap and the command table; a second `?` (or `:help all`) shows all of them, and a filter always searches all of them. Help rows are keyed by key and description, as two contexts can share a label.
1.7 KiB
Sharing
Any document can be shared read-only behind a link that cannot be guessed. The reader needs no account.
| key or command | what it does |
|---|---|
:share |
share the document and copy its link |
:share new |
make a new link for the same document; the old one stops working (asks first) |
:share off |
stop sharing (asks first) |
:info share |
the share part of the info sheet: whether the document is public and the shape of its link; s there shares or stops, y makes a new link |
The link looks like https://your-host/s/<token>#<key>. The page renders the
document read-only and serves only the pictures and videos it embeds right now:
take a picture out of the document and it is gone from the link too. Links to
other documents in it are turned into plain text, since the reader could not
follow them. Sealed files are never shown; :share says how many the document
holds.
Why the link has two halves
The token names the document; the key proves the reader was given the whole
link. A browser never sends the part after # to the server, so the key stays
out of access logs, referrers and link previews. A crawler or chat client that
kept only the path holds a link that answers 404.
The server keeps only a SHA-256 of the key and compares it in constant time, and
a wrong key is answered exactly like an unknown token. That also means the full
link exists only once, when :share copies it. It cannot be read back from the
document later; :share new makes a new one instead, which is also the way to cut a
reader off without unpublishing.
A document in the trash answers like an unknown link, and works again with the same link when it is restored.