Odoc_document.Urlmodule Path : sig ... endmodule Anchor : sig ... endtype kind = Anchor.kindtype t = Anchor.tval from_identifier : stop_before:bool -> Odoc_model.Paths.Identifier.t -> tfrom_identifier turns an identifier to an url.
Some identifiers can be accessed in different ways. For instance, submodules generate a dedicated page, but they can also be linked to at their parent page, using a hash to the declaration.
The stop_before boolean controls that: with ~stop_before:true, the url will point to the parent page when applicable.
There is a pitfall with from_identifier: Using ~stop_before:false with a module that does not contain an expansion, such as a module alias. This will return a url leading to a 404 page.
It would be nice to enforce no 404 by the type system.
val from_asset_identifier : Odoc_model.Paths.Identifier.AssetFile.t -> tval kind : Odoc_model.Paths.Identifier.t -> kindval render_path : Odoc_model.Paths.Path.t -> string