Module Odoc_document.UrlSource

Sourcemodule Path : sig ... end
Sourcemodule Anchor : sig ... end
Sourcetype kind = Anchor.kind
Sourceval from_path : Path.t -> t
Sourceval from_identifier : stop_before:bool -> Odoc_model.Paths.Identifier.t -> t

from_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.

Sourceval from_asset_identifier : Odoc_model.Paths.Identifier.AssetFile.t -> t
Sourceval render_path : Odoc_model.Paths.Path.t -> string