package b0

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module B0_odoc.ThemeSource

Odoc theme support.

Themes names

Sourcetype name = string

The type for theme names.

Sourceval odoc_default : name

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

Sourceval odig_default : name

odig_default is the default odig theme ("odig.default").

Sourceval default_uri : string

default_uri is a default uri to give to Html.cmd, this is "_odoc-theme". This will use that directory in the html directory.

User preference

Sourceval config_file : B0_std.Fpath.t

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

Sourceval get_user_preference : unit -> (name option, string) result

get_user_preference () is the user prefered theme name (if any).

Sourceval set_user_preference : name option -> (unit, string) result

set_user_preference t sets the user prefered theme to t.

Themes

Sourcetype t

The type for themes.

Sourceval name : t -> name

name t is the theme name.

Sourceval path : t -> B0_std.Fpath.t

path t is the path to the theme directory.

Sourceval pp_name : t B0_std.Fmt.t

pp_name formats a theme's name.

pp formats a theme.

Queries

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

Sourceval find : fallback:name option -> name -> t list -> (t, string) result

find ~fallback n ts finds theme n in ts. An error is returned if n cannot be found, in that case it indicates fallback will be used instead (if specified).

Writing

Sourceval write : B0_memo.t -> t -> to_dir:B0_std.Fpath.t -> unit

write m t ~to_dir writes theme to directory to_dir. This simply copies path to to_dir.