pub struct DocsOptions {
pub title: String,
pub source_url: Option<String>,
pub home_url: Option<String>,
pub home_title: Option<String>,
pub stylesheet: Option<String>,
pub views: BTreeMap<String, ViewSource>,
pub theme: BTreeMap<String, ThemeColor>,
pub color_scheme: ColorScheme,
pub scheme_toggle: bool,
pub viewer: bool,
pub nouns: BTreeMap<String, String>,
pub asbuilt_version: Option<String>,
}Expand description
What the pages need beyond the model.
Fields§
§title: String§source_url: Option<String>A prefix that turns a repo-relative path into a link
(https://github.com/owner/repo/blob/main/); paths are plain
text when absent.
home_url: Option<String>Where the tree is mounted: a link back to the site that hosts it,
first in every page’s header trail. Relative
values (../) are resolved from each page’s own depth, so they
hold under a versioned snapshot; absolute URLs are used verbatim.
home_title: Option<String>The text of that link; home_url itself when absent. Every
page’s <title> starts with it, so a tab names the host.
stylesheet: Option<String>A stylesheet linked last in every page’s head, after the tree’s
own, so a host site can restate the page tokens in its palette.
Resolved like home_url.
views: BTreeMap<String, ViewSource>The rendered views under views/, by file stem (index,
view_app, context): the SVG and the .dot beside it. A view
with a LikeC4 .dot is inlined into its page; any other SVG is an
image.
theme: BTreeMap<String, ThemeColor>A color per element kind from [theme], the source of theme.css.
color_scheme: ColorSchemeThe scheme the pages show before a visitor chooses one.
scheme_toggle: boolWhether every page carries a System / Light / Dark control, and
with it theme.js.
viewer: boolWhether every inlined view gets the viewer (viewer.js): a frame
at a readable scale, zoom and pan, and Fit, 1:1, Wide, Legend and
Fullscreen controls.
nouns: BTreeMap<String, String>The surveyed language’s word for an element kind (container is
a crate in Rust), for each diagram’s legend; a kind absent here is
called by its own name.
asbuilt_version: Option<String>The asbuilt release writing the tree, named in every page’s generator meta and footer; neither names one when absent.