on master help sign in
docs: decode all html entities
commit6d36307172e968b6dfcbac90fe9ec97bd057fc98 authorMatilde Park <matilde.park@urbit.org> dateMon 6 Jun 2022, 19:20 (4 years ago) parent2f8f250
8 files changed+49−36
content/docs/arvo/eyre/guide.md+5−5 content/docs/system-overview/arvo.md+2−2 content/docs/userspace/dist/guide.md+17−4 content/docs/userspace/full-stack/7-react-setup.md+1−1 content/docs/userspace/http-api-guide.md+14−14 content/docs/userspace/threads/basics/bind.md+5−5 content/docs/userspace/threads/basics/output.md+1−1 content/docs/userspace/threads/basics/summary.md+4−4
content/docs/arvo/eyre/guide.md+5−5
@@ -204,7 +204,7 @@ Server: urbit/vere-1.5
204204set-cookie: urbauth-~zod=0v1.1pseu.tq7hs.hps2t.ltaf1.tmqjm; Path=/; Max-Age=604800
205205content-type: text/html
206206
207−&lt;html>&lt;head>&lt;title>404 Not Found&lt;/title>&lt;/head>&lt;body>&lt;h1>Not Found&lt;/h1>&lt;p>There was an error while handling the request for /foo/bar/baz.json.&lt;/p>&lt;code>no scry result&lt;/code>&lt;/body>&lt;/html>
207+<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>There was an error while handling the request for /foo/bar/baz.json.</p><code>no scry result</code></body></html>
208208```
209209
210210## Advanced
@@ -254,7 +254,7 @@ Note that this example does a lot of things manually for demonstrative purposes.
254254 ~& [mark req]
255255 ?+ method.request.q.req
256256 =/ data=octs
257− (as-octs:mimes:html '&lt;h1>405 Method Not Allowed&lt;/h1>')
257+ (as-octs:mimes:html '<h1>405 Method Not Allowed</h1>')
258258 =/ content-length=@t
259259 (crip ((d-co:co 1) p.data))
260260 =/ =response-header:http
@@ -272,7 +272,7 @@ Note that this example does a lot of things manually for demonstrative purposes.
272272 ::
273273 %'GET'
274274 =/ data=octs
275− (as-octs:mimes:html '&lt;h1>Hello, World!&lt;/h1>')
275+ (as-octs:mimes:html '<h1>Hello, World!</h1>')
276276 =/ content-length=@t
277277 (crip ((d-co:co 1) p.data))
278278 =/ =response-header:http
@@ -374,7 +374,7 @@ Content-Type: text/html
374374Content-Length: 22
375375transfer-encoding: chunked
376376
377−&lt;h1>Hello, World!&lt;/h1>%
377+<h1>Hello, World!</h1>%
378378```
379379
380380...which has succeed! This is because the `+on-poke` arm tests for http GET requests and responds with `Hello, World!` when it sees one:
@@ -382,7 +382,7 @@ transfer-encoding: chunked
382382```hoon
383383 %'GET'
384384=/ data=octs
385− (as-octs:mimes:html '&lt;h1>Hello, World!&lt;/h1>')
385+ (as-octs:mimes:html '<h1>Hello, World!</h1>')
386386=/ content-length=@t
387387 (crip ((d-co:co 1) p.data))
388388=/ =response-header:http
content/docs/system-overview/arvo.md+2−2
@@ -11,9 +11,9 @@ itself from over the network without downtime. The Arvo kernel proper is quite
1111simple -- it's only about 600 lines of code, excluding its various modules.
1212
1313The Urbit transition function is implemented in Arvo. Upon being 'poked' by Vere
14−with the pair of `&lt;input event, state>`, Arvo directs the event to the
14+with the pair of `<input event, state>`, Arvo directs the event to the
1515appropriate OS module. The result of each Vere 'poke' is a pair of
16−`&lt;output events, new state>`. Events are typed, and each has an explicit call-stack
16+`<output events, new state>`. Events are typed, and each has an explicit call-stack
1717structure indicating the event's source module in Arvo.
1818
1919For a more in-depth technical introduction, see [Arvo Overview](/docs/arvo/overview).
content/docs/userspace/dist/guide.md+17−4
@@ -194,10 +194,23 @@ We've grabbed an image to use in our "Hello world!" page. The next thing we need
194194In the editor, paste in the following HTML and save it:
195195
196196```html
197−&lt;!DOCTYPE html> &lt;html> &lt;head> &lt;style> div { text-align: center; }
198−&lt;/style> &lt;/head> &lt;title>Hello World&lt;/title> &lt;body> &lt;div>
199−&lt;h1>Hello World!&lt;/h1> &lt;img src="img/pot.svg" alt="pot" width="219"
200−height="196" /> &lt;/div> &lt;/body> &lt;/html>
197+<!DOCTYPE html>
198+<html>
199+ <head>
200+ <style>
201+ div {
202+ text-align: center;
203+ }
204+ </style>
205+ </head>
206+ <title>Hello World</title>
207+ <body>
208+ <div>
209+ <h1>Hello World!</h1>
210+ <img src="img/pot.svg" alt="pot" width="219" height="196" />
211+ </div>
212+ </body>
213+</html>
201214```
202215
203216Our `hello-glob` folder should now look like this:
content/docs/userspace/full-stack/7-react-setup.md+1−1
@@ -74,7 +74,7 @@ window.ship = "sampel-palnet";
7474```
7575
7676`sampel-palnet` will of course be replaced by the actual name of the ship. We
77−include this script by adding the following line to the `&lt;head>` section of
77+include this script by adding the following line to the `<head>` section of
7878`public/index.html`:
7979
8080```
content/docs/userspace/http-api-guide.md+14−14
@@ -147,7 +147,7 @@ import Urbit from '@urbit/http-api';
147147```
148148
149149Note that the examples in this guide are simple HTML documents with vanilla
150−Javascript in `&lt;script>` tags, so they use [unpkg.com](https://unpkg.com) to
150+Javascript in `<script>` tags, so they use [unpkg.com](https://unpkg.com) to
151151import `@urbit/http-api`. This is not typical, and is just done here for
152152purposes of simplicity.
153153
@@ -437,7 +437,7 @@ This example will, upon clicking the "Subscribe" button, subscribe to the
437437update it receives. You can test it by doing something like posting a message in
438438a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
439439
440−```
440+````
441441<html>
442442 <head>
443443 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -445,7 +445,7 @@ a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
445445 </head>
446446 <body>
447447 <button id="toggle" type="button" onClick="doSub()" >Subscribe</button>
448− <pre id="event"></pre>
448+ <pre id="event">```
449449 </body>
450450 <script>
451451 const api = new UrbitHttpApi.Urbit("");
@@ -478,7 +478,7 @@ a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
478478 };
479479 </script>
480480</html>
481−```
481+````
482482
483483### Subscribe Once
484484
@@ -514,7 +514,7 @@ printing every `graph-store` update it receives, it will instead just print the
514514first one it receives and close the subscription. Additionally, it sets a five
515515second timeout, and prints an error message if it times out.
516516
517−```
517+````
518518<html>
519519 <head>
520520 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -522,7 +522,7 @@ second timeout, and prints an error message if it times out.
522522 </head>
523523 <body>
524524 <button type="button" onClick="doSub()" >Subscribe Once</button>
525− <pre id="event"></pre>
525+ <pre id="event">```
526526 </body>
527527 <script>
528528 const api = new UrbitHttpApi.Urbit("");
@@ -541,7 +541,7 @@ second timeout, and prints an error message if it times out.
541541 };
542542 </script>
543543</html>
544−```
544+````
545545
546546### Scries
547547
@@ -564,7 +564,7 @@ Upon pressing the "Scry Graphs" button, this example will scry the `graph-store`
564564agent's `/keys` endpoint for the list of graphs, and print the resulting JSON
565565data.
566566
567−```
567+````
568568<html>
569569 <head>
570570 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -572,7 +572,7 @@ data.
572572 </head>
573573 <body>
574574 <button id="scry" type="button" onClick="doScry()" >Scry Graphs</button>
575− <pre id="result"></pre>
575+ <pre id="result">```
576576 </body>
577577 <script>
578578 const api = new UrbitHttpApi.Urbit("");
@@ -584,7 +584,7 @@ data.
584584 }
585585 </script>
586586</html>
587−```
587+````
588588
589589### Thread
590590
@@ -608,7 +608,7 @@ mark conversion failed, the promise will fail.
608608This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
609609`graph-eval` thread in the `landscape` desk, and prints the result.
610610
611−```
611+````
612612<html>
613613 <head>
614614 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -617,8 +617,8 @@ This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
617617 <body>
618618 <input id="hoon" type="text" placeholder="Hoon to evaluate" />
619619 <button id="submit" type="button" onClick="runThread()" >Submit</button>
620− <pre id="expr"></pre>
621− <pre id="result"></pre>
620+ <pre id="expr">```
621+ <pre id="result">```
622622 </body>
623623 <script>
624624 document.getElementById("hoon")
@@ -646,7 +646,7 @@ This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
646646 };
647647 </script>
648648</html>
649−```
649+````
650650
651651### Delete Channel
652652
content/docs/userspace/threads/basics/bind.md+5−5
@@ -34,16 +34,16 @@ j
3434
3535## bind
3636
37−Bind by itself must be specialised like `(bind:m ,&lt;type>)` and it takes two arguments:
37+Bind by itself must be specialised like `(bind:m ,<type>)` and it takes two arguments:
3838
39−- The first argument is a function that returns the `form` of a strand which produces `&lt;type>`.
40−- The second argument is a gate whose sample is `&lt;type>` and which returns a `form`.
39+- The first argument is a function that returns the `form` of a strand which produces `<type>`.
40+- The second argument is a gate whose sample is `<type>` and which returns a `form`.
4141
42−Since you'll invariably use it in conjunction with micgal, the `&lt;type>` in `;< &lt;type> bind:m ...` will both specialise `bind` and specify the gate's sample.
42+Since you'll invariably use it in conjunction with micgal, the `<type>` in `;< <type> bind:m ...` will both specialise `bind` and specify the gate's sample.
4343
4444Bind calls the first function then, if it succeeded, calls the second gate with the result of the first as its sample. If the first function failed, it will instead just return an error message and not bother calling the next gate. So it's essentially "strand A then strand B".
4545
46−Since the second gate may itself contain another `;< &lt;type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
46+Since the second gate may itself contain another `;< <type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
4747
4848## strandio
4949
content/docs/userspace/threads/basics/output.md+1−1
@@ -4,7 +4,7 @@ weight = 4
44template = "doc.html"
55+++
66
7−A strand produces a `[(list card) &lt;response>]`. The first part is a list of cards to be sent off immediately, and `&lt;response>` is one of:
7+A strand produces a `[(list card) <response>]`. The first part is a list of cards to be sent off immediately, and `<response>` is one of:
88
99- `[%wait ~]`
1010- `[%skip ~]`
content/docs/userspace/threads/basics/summary.md+4−4
@@ -55,8 +55,8 @@ Now here's a quick recap of the main points covered:
5555
5656- is used to chain strands together like javascript promises
5757- is used in conjunction with micgal (`;<`)
58−- must be specialised to a type like `;< &lt;type> bind:m ...`
59−- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `&lt;type>`. The second is a gate whose sample is `&lt;type>` and which returns a `form`.
58+- must be specialised to a type like `;< <type> bind:m ...`
59+- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `<type>`. The second is a gate whose sample is `<type>` and which returns a `form`.
6060- calls the first and then, if it succeeded, calls the second with the result of the first as its sample.
6161
6262## Strand input
@@ -68,9 +68,9 @@ Now here's a quick recap of the main points covered:
6868
6969## Strand output
7070
71−- contains `[cards=(list card:agent:gall) &lt;response>]`
71+- contains `[cards=(list card:agent:gall) <response>]`
7272- `cards` are any cards to be sent immediately
73−- `&lt;response>` is something like `[%done value]`, `[%fail err]`, etc.
73+- `<response>` is something like `[%done value]`, `[%fail err]`, etc.
7474- `%done` will contain the result
7575- responses are only used internally to manage the flow of the thread and are not returned to subscribers.
7676