@@ -37,13 +37,15 @@ anything breaking, especially references.
37
37
38
38
The idea is that we have named groups of documentation, that we'll call {e trees}
39
39
here. We have two kinds of trees: page trees, and modules trees. Inside the
40
- trees, everything is managed by [odoc]. The driver is free to root them however
41
- they like in the overall hierarchy. In order to reference another tree, a
42
- documentation author can use the name of the tree in the reference.
40
+ trees, the hierarchy is managed by [odoc]. The driver is free to "root" them
41
+ however they like in the overall hierarchy. So [odoc] is responsible for the
42
+ hierarchy below the trees root, and the driver is responsible for the one
43
+ outside of the trees. In order to reference another tree, a documentation author
44
+ can use the name of the tree in the reference.
43
45
44
46
Different situations will give different meanings to the trees. In the case of
45
47
[opam] packages, though, there is a natural meaning to give to those trees
46
- (you'll find more details in the convention for opam-installed packages). Any
48
+ (you'll find more details in the {{!label-conv} convention for opam-installed packages} ). Any
47
49
opam package will have an associated "documentation tree", named with the name
48
50
of the package. Any of its libraries will have an associated "module tree",
49
51
named with the name of the library. Another package can thus refer to the doc
@@ -110,11 +112,11 @@ Let's have a look at a generic invocation of [odoc] during the compile phase:
110
112
for pages. Documentation artifacts that will be in the same {{!units}unit of
111
113
documentation} need to hare a common root in their parent id.
112
114
113
- - [-I <dir>] corresponds to the search path for other [.odoc] files. It can be
114
- given as many times as necessary, but should allow to access every [.odoc]
115
- file generated from a [.cm{i;t;ti}] listed when calling [odoc compile-deps] on
116
- the input file. [<dir>] are directories under the [<od>] directory, computed
117
- from the [--parent-id] option given to previous calls to [odoc compile] .
115
+ - [-I <dir>] corresponds to the search path for other [.odoc] files. Multiple
116
+ directory can be added to the search path, so every required [.odoc] file is
117
+ in the search path. The required [.odoc] files are the one generated from a
118
+ [.cm{i;t;ti}] file listed when calling [odoc compile-deps] on the input
119
+ file .
118
120
119
121
A concrete example for such command would be:
120
122
@@ -313,7 +315,10 @@ web worker to perform searches:
313
315
standard mechanism of message passing.
314
316
315
317
- The web worker has to send back the result as a message to the main thread,
316
- containing the list of results. The format is defined in the TODO.
318
+ containing the results. The format for the result message is a string that can
319
+ be parsed as a list of JSON objects. Each object contain two keys-value pairs:
320
+ a key ["url"] which contains a relative URL from [--ouput-dir]; and a key
321
+ ["html"] which contain the html showing the search entry.
317
322
318
323
- The JavaScript file must be manually put in the [--output-dir] values, the driver can
319
324
decide where.
@@ -389,7 +394,7 @@ argument, and give the asset unit using [--asset-unit].
389
394
$ odoc html-generate-asset --output-dir <odir> --asset-unit <path/to/asset-file.odocl> <path/to/asset/file.ext>
390
395
]}
391
396
392
- {1 Convention for installed packages}
397
+ {1:conv Convention for installed packages}
393
398
394
399
In order to build the documentation for installed packages, the driver needs to
395
400
give a meaning to the various concepts above. In particular, it needs to
@@ -427,7 +432,7 @@ define three trees:
427
432
other trees, a [-L foo:<odoc_dir>/foo/lib/foo] argument needs to be added
428
433
at the link phase.
429
434
430
- - A module tree named [foo.bar], with root id [foo/doc ]. When referred from
435
+ - A module tree named [foo.bar], with root id [foo/lib/foo.bar ]. When referred from
431
436
other trees, a [-L foo.bar:<odoc_dir>/foo/lib/foo.bar] argument needs to be
432
437
added at the link phase.
433
438
0 commit comments