From cbbbc847a8bf86f691f58a5c8888e10e3484fe9d Mon Sep 17 00:00:00 2001 From: Paul-Elliot Date: Thu, 28 Sep 2023 13:02:22 +0200 Subject: [PATCH] Assets: add documentation Signed-off-by: Paul-Elliot --- doc/ocamldoc_differences.mld | 2 ++ doc/odoc_for_authors.mld | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/ocamldoc_differences.mld b/doc/ocamldoc_differences.mld index b32bc6d23f..6a9131f43a 100644 --- a/doc/ocamldoc_differences.mld +++ b/doc/ocamldoc_differences.mld @@ -33,6 +33,7 @@ The following describes the changes between what [odoc] understands and what’s - [odoc] has a better mechanism for disambiguating references in comments. See 'reference syntax' later in this document. - Built-in support for standalone [.mld] files. These are documents using the OCamldoc markup, but they’re rendered as distinct pages. - Structured output: [odoc] can produce output in a structured directory tree rather a set of files. +- [odoc] support the inclusion of assets in the structured directory tree. - A few extra tags are supported: + [@returns] is a synonym for [@return] + [@raises] is a synonym for [@raise] @@ -55,6 +56,7 @@ Additionally we support extra annotations: - [instance-variable] refers to instance variables - [label] refers to labels introduced in anchors - [page] refers to [.mld] pages as outlined above +- [asset] refers assets as outlined above - [value] is recognised as [val] {3 Referencing items containing hyphens or dots} diff --git a/doc/odoc_for_authors.mld b/doc/odoc_for_authors.mld index 99629e3acd..5f69660673 100644 --- a/doc/odoc_for_authors.mld +++ b/doc/odoc_for_authors.mld @@ -392,13 +392,14 @@ The prefixes supported are: - [instance-variable] - [section] (and the equivalent deprecated prefix [label]) - for referring to headings - [page] - for referring to [.mld] pages +- [asset] - for referring to assets In some cases the element being referenced might have a hyphen, a dot or a space in the name, e.g. if trying to refer to a page from a [.mld] file "1.2.3.mld". In this case, the element name should be quoted with double quote marks: {v -{!page-"1.2.3"} +{!page-"1.2.3"}, {!asset-"file.txt"} v}