Module Odoc_document.Url
module Path : sig ... endmodule Anchor : sig ... endtype kind = Odoc_document.Url.Anchor.kindtype t = Odoc_document.Url.Anchor.tval from_path : Odoc_document.Url.Path.t -> Odoc_document.Url.tval from_identifier :
stop_before:bool ->
Odoc_model.Paths.Identifier.t ->
Odoc_document.Url.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 ->
Odoc_document.Url.tval kind : Odoc_model.Paths.Identifier.t -> Odoc_document.Url.kindval render_path : Odoc_model.Paths.Path.t -> string