(* * SPDX-FileCopyrightText: 2024 The Forester Project Contributors * SPDX-FileCopyrightText: 2026 The Forester Project Contributors * * SPDX-License-Identifier: GPL-3.0-or-later *) type foreign = {path: string; route_locally: bool; include_in_manifest: bool} [@@deriving show] type t = { trees: string list; assets: string list; foreign: foreign list; url: URI.t; home: URI.t; theme: string option; path: string option; } [@@deriving show] let default_url = URI.of_string_exn "http://forest.local/" let docs_url = URI.of_string_exn "https://www.forester-notes.org/" let default ?(url = default_url) () : t = { trees = ["trees"]; assets = []; foreign = []; url; home = URI.named_uri ~base:url "index"; theme = None; path = None; } let make ?(trees = []) ?(assets = []) ?(foreign = []) ?(url = default_url) ?(home = URI.of_string_exn "http://forest.local/index") ?(theme = None) ?(path = None) () = {trees; assets; foreign; url; home; theme; path} let home_uri config = config.home type error = Missing_directory of string