Skip to content

Commit 4219073

Browse files
committed
Update docs
1 parent b7f7bbc commit 4219073

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

doc/driver/index.mld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ File "src/parser/odoc_parser.mli", line 45, characters 30-45:
5050
Warning: Failed to resolve reference unresolvedroot(parse_coment) Couldn't find "parse_coment"
5151
]}
5252

53-
which highlights
53+
which here is highlighting an error in a reference in `odoc_parser.mli`.
5454

5555
{2 Remapping dependencies}
5656

doc/json.mld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ In addition, there is a per-package 'global' sidebar json file.
1212

1313
{@json[
1414
{
15+
"header": "<h1>Module <code><span>Stdlib</span></code><a href=\"../../src/stdlib/stdlib.ml.html\" class=\"source_link\">Source</a></h1>",
1516
"type": "documentation",
1617
"uses_katex": false,
1718
"breadcrumbs": [
1819
{
19-
"name": "🏠",
20+
"name": "Package index",
2021
"href": "../../../index.html",
2122
"kind": "leaf-page"
2223
},
@@ -66,6 +67,7 @@ ace\" ...."
6667

6768
The fields of the JSON are as follows:
6869

70+
- [header] is a string containing HTML for the header of the page.
6971
- [type] field is either [documentation] or [source].
7072
- [uses_katex] is [true] if the page has math entries ([{m ...}] or [{math ...}]).
7173
- [breadcrumbs] is a list of breadcrumb entries with members [name], [href] and [kind]. If [href] is null then there is no index page at that location in the hierarchy. [kind] is one of

doc/odoc_for_authors.mld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,22 @@ Here is some Python code:
489489
return 0
490490
]}
491491

492+
{4:code_block_tags Code Block Tags}
493+
Code blocks may have arbitrary metadata associated with them. This metadata is
494+
used, for example, for selecting code blocks when extracting them from a source file via the
495+
[odoc extract-code] command. The metadata may also be used by other tools that
496+
operate on code blocks, for example, {{!https://github.com/realworldocaml/mdx}mdx}.
497+
498+
The metadata follows immediately after the language header, and is a list of tags and bindings, separated by whitespace. Tags are simple
499+
keywords, and bindings are key-value pairs separated by an equals sign. If whitespace
500+
is needed in keys, values or tags, it should be enclosed in double quotes. For example:
501+
502+
{v
503+
{@ocaml tag1 "tag 2" key1="value 1" "key 2"="value 2"[
504+
... code goes here ...
505+
]}
506+
v}
507+
492508
{4:verbatim_blocks Verbatim Blocks}
493509

494510
It is possible to write language agnostic code blocks, also called verbatim

0 commit comments

Comments
 (0)