Module Odig_support.Odoc_theme

Odoc theme support.

Themes names

type name = string

The type for theme names.

val default : name

default is the default odoc theme ("odoc.default").

User preference

val config_file : B0_std.Fpath.t

config_file is the file relative to the user's Os.Dir.config directory for specifying the odoc theme.

val get_user_preference : unit -> (name, string) Stdlib.result

get_user_preference () is the user prefered theme name or default if the user has no preference.

val set_user_preference : name -> (unit, string) Stdlib.result

set_user_preference t sets the user prefered theme to t.

Themes

type t

The type for themes.

val name : t -> name

name t is the theme name.

val path : t -> B0_std.Fpath.t

path t is the path to the theme directory.

val pp_name : t B0_std.Fmt.t

pp_name formats a theme's name.

val pp : t B0_std.Fmt.t

pp formats a theme.

Queries

val of_dir : B0_std.Fpath.t -> t list

of_dir sharedir are the themes found in sharedir. These are formed by looking up in sharedir for directory paths of the form PKG/odoc-theme/ID/ in sharedir which yields a theme named by PKG.ID.

val find : name -> t list -> (t, string) Stdlib.result

find n themes finds the theme named n in themes.