@@ -21,7 +21,15 @@ page's links point at `/`.
24+Build the desk with Nix. `result` is then the desk folder:
27+nix build github:iko-soy/shelf
30+From a checkout, `nix build` does the same, or you can use `desk/` directly.
24−From the repo root, with your ship running:
32+Then, with your ship running:
27~sampel-palnet:dojo> |new-desk %shelf
35~sampel-palnet:dojo> |new-desk %shelf
@@ -29,7 +37,8 @@ From the repo root, with your ship running:
32−cp -R desk/* /path/to/pier/shelf/
40+cp -R result/* /path/to/pier/shelf/
41+chmod -R u+w /path/to/pier/shelf # files from the Nix store are read-only
@@ -37,15 +46,16 @@ cp -R desk/* /path/to/pier/shelf/
37~sampel-palnet:dojo> |install our %shelf
46~sampel-palnet:dojo> |install our %shelf
40−The page is now at `https://<your-ship>/shelf`. It is meant to be opened
49+The page is now at `https://<your-ship>/shelf`, and Landscape shows a Shelf
50+tile that opens it. It is meant to be opened through your own domain, though:
41−through your own domain, though: on the ship's address the page renders, but
51+on the ship's address the page renders, but its links lead to `/`, which
42−its links lead to `/`, which belongs to Landscape.
52+belongs to Landscape.
46−Copy `desk/*` into the mount again and run `|commit %shelf`. Then check that
56+Build and copy the desk into the mount again, as above, and run
47−`.^(cass:clay %cw /=shelf=)` moved: if the new version doesn't build, Clay
57+`|commit %shelf`. Then check that `.^(cass:clay %cw /=shelf=)` moved: if the
48−keeps the old one and logs nothing.
58+new version doesn't build, Clay keeps the old one and logs nothing.
50%shelf is installed from your own ship, so it gets no over-the-air updates.
60%shelf is installed from your own ship, so it gets no over-the-air updates.
51After a kernel upgrade, Clay holds it until `desk/sys.kelvin` lists the new
61After a kernel upgrade, Clay holds it until `desk/sys.kelvin` lists the new
@@ -65,6 +75,9 @@ before you can publish it.
65 `:treaty|remove-desk ~other-ship %app`, and stop following with
75 `:treaty|remove-desk ~other-ship %app`, and stop following with
66 `:treaty|unally ~other-ship`.
76 `:treaty|unally ~other-ship`.
78+%shelf has a docket of its own, so `:treaty|publish %shelf` lists it on its
79+own page, where others can install it.
68A republished app appears once your ship has received its docket from the
81A republished app appears once your ship has received its docket from the
69publisher, which happens a few seconds after you ally them. Apps are sorted by
82publisher, which happens a few seconds after you ally them. Apps are sorted by
70title. %shelf reads the alliance on every request, but browsers may show a
83title. %shelf reads the alliance on every request, but browsers may show a
@@ -206,8 +219,10 @@ after %shelf stops. Until you remove it, `/shelf` answers 503 at once.
2061. Remove the site from your reverse proxy first. Otherwise visitors get that
2191. Remove the site from your reverse proxy first. Otherwise visitors get that
207 503 page, or, once the binding is gone, an endless redirect loop between
220 503 page, or, once the binding is gone, an endless redirect loop between
208 Landscape's login page and `/`.
221 Landscape's login page and `/`.
209−2. `|uninstall %shelf`. Your `head`/`body` HTML is kept, and installing again
222+2. `:docket|uninstall %shelf`, or Uninstall from the tile's menu in
223+ Landscape. This removes the tile and suspends the agent; a plain
224+ `|uninstall %shelf` would leave a suspended tile behind. Your `head`/`body`
210− brings the page straight back.
225+ HTML is kept, and `|install our %shelf` brings the page straight back.
2113. To delete that state too: `|nuke %shelf, =desk &` (answer `y`).
2263. To delete that state too: `|nuke %shelf, =desk &` (answer `y`).
2124. Optionally, free the path. Only the binding's owner can remove it, so take
2274. Optionally, free the path. Only the binding's owner can remove it, so take
213 it over from the dojo, then remove it:
228 it over from the dojo, then remove it:
@@ -226,13 +241,16 @@ The desk is self-contained. `desk/` holds everything Clay needs:
227| Path | What |
242| Path | What |
244+| `desk.docket-0` | What Landscape shows: title, description, color, version, website, license |
229| `app/shelf.hoon` | The agent: Eyre binding, routing, scries, responses |
245| `app/shelf.hoon` | The agent: Eyre binding, routing, scries, responses |
230| `lib/shelf.hoon` | Pure helpers and the page (Sail) |
246| `lib/shelf.hoon` | Pure helpers and the page (Sail) |
231| `sur/shelf.hoon`, `mar/shelf/action.hoon`, `gen/shelf/` | The `head`/`body` settings |
247| `sur/shelf.hoon`, `mar/shelf/action.hoon`, `gen/shelf/` | The `head`/`body` settings |
232| `web/shelf.css`, `web/copy.js` | Inlined into the page at build time with `/*` |
248| `web/shelf.css`, `web/copy.js` | Inlined into the page at build time with `/*` |
233| `tests/lib/shelf.hoon` | Unit tests, including the rendered page |
249| `tests/lib/shelf.hoon` | Unit tests, including the rendered page |
234| `lib/sigil.hoon`, `lib/sigil/symbols.hoon` | Vendored [sigil renderer](https://github.com/Fang-/suite) (MIT, ~paldev; shapes from `@urbit/sigil-js`, MIT, Tlon) |
250| `lib/sigil.hoon`, `lib/sigil/symbols.hoon` | Vendored [sigil renderer](https://github.com/Fang-/suite) (MIT, ~paldev; shapes from `@urbit/sigil-js`, MIT, Tlon) |
235−| other `lib/`, `mar/`, `sur/` files | Copied unmodified from `%base` (urbit/urbit `5a187fe`) and `%landscape` (`sur/treaty`, `sur/docket`; tloncorp/landscape `46c6ed8`) |
251+| other `lib/`, `mar/`, `sur/` files | Copied unmodified from `%base` (urbit/urbit `5a187fe`) and `%landscape` (`sur/treaty`, `sur/docket`, `lib/docket`, `mar/docket-0`; tloncorp/landscape `46c6ed8`) |
253+`flake.nix` makes `nix build` produce the desk as `result`.
237Run the tests on a ship with the desk installed:
255Run the tests on a ship with the desk installed:
@@ -254,3 +272,10 @@ Some details that are easy to get wrong:
254- **Clay can refuse a commit silently.** It refuses commits that would stop a
272- **Clay can refuse a commit silently.** It refuses commits that would stop a
255 running agent from building, and logs nothing. After `|commit`, check that
273 running agent from building, and logs nothing. After `|commit`, check that
256 `.^(cass:clay %cw /=shelf=)` moved.
274 `.^(cass:clay %cw /=shelf=)` moved.
278+MIT; see [LICENSE](LICENSE). The vendored files keep their own notices:
279+`lib/sigil.hoon` and `lib/sigil/symbols.hoon` are MIT (Fang; shapes from
280+`@urbit/sigil-js`, Tlon), and the files from `%base` and `%landscape` come
281+from urbit/urbit (MIT) and tloncorp/landscape.