@@ -6,6 +6,35 @@ One of the most common ways to use ford is through ford's runes, all of which be
7Another common use case is assembling and rendering markdown templates into a single HTML file, to be sent as an HTTP response in urbit's web server `%eyre`. It's important to keep in mind that %ford is quite flexible and generic, and is used in other parts of urbit -- such as the dojo -- that would not traditionally fall under the auspices of a build system.
7Another common use case is assembling and rendering markdown templates into a single HTML file, to be sent as an HTTP response in urbit's web server `%eyre`. It's important to keep in mind that %ford is quite flexible and generic, and is used in other parts of urbit -- such as the dojo -- that would not traditionally fall under the auspices of a build system.
9+### `/+` import from lib/
11+The `/+` rune accepts a filename as an argument. It interprets that filename
12+as a hoon source file within the `lib` directory. This is how we import a shared
21+produces: `"c.314d"` (or something similar depending on when you run it)
23+### `/-` import from sur/
25+The `/-` rune accepts a filename as an argument. It interprets that filename as
26+a hoon source file within the `sur` directory. The `sur` directory contains
27+shared structures that can be used by other parts of urbit. This is somewhat
28+similar to including a header file in C.
9### `/~` twig by hand
38### `/~` twig by hand
11`/~ <twig>` produces a horn that evaluates a twig and places the product
40`/~ <twig>` produces a horn that evaluates a twig and places the product
@@ -22,9 +51,9 @@ produces:
22### `//` include a file by relative path
51### `//` include a file by relative path
24`// <rel-path>` parses `rel-path` as a hoon twig, and then adds the resulting
53`// <rel-path>` parses `rel-path` as a hoon twig, and then adds the resulting
25−twig to the subject. It's similar to `#include` in C. Note that the result type
54+twig to the subject. Note that the result type of this rune is not a horn, but
26−of this rune is not a horn, but just a hoon twig, so its result can't be used
55+just a hoon twig, so its result can't be used as an argument to other runes
27−as an argument to other runes that expect a horn.
56+that expect a horn.
@@ -223,32 +252,3 @@ produces two `<script>` tags. The first has its contents set to the contents
223of the JavaScript file we loaded from clay. The second is an auto-update
252of the JavaScript file we loaded from clay. The second is an auto-update
224script that polls the server to check whether the dependency hash has changed.
253script that polls the server to check whether the dependency hash has changed.
225This pattern is used in urbit's `tree` web publishing system.
254This pattern is used in urbit's `tree` web publishing system.
227−### `/+` import from lib/
229−The `/+` rune accepts a filename as an argument. It interprets that filename
230−as a hoon source file within the `lib` directory. This is how we import a shared
239−produces: `"c.314d"` (or something similar depending on when you run it)
241−### `/-` import from sur/
243−The `/-` rune accepts a filename as an argument. It interprets that filename as
244−a hoon source file within the `sur` directory. The `sur` directory contains
245−shared structures that can be used by other parts of urbit. This is somewhat
246−similar to including a header file in C.