html viz

HTML template gives users a number of helper template functions, along with a dataset document at ds. Exposing the dataset document as “ds” matches our conventions for referring to a dataset elsewhere, and allows access to all defined parts of a dataset. HTML visualization is built atop the go template syntax You can use these curly-brace templates anywhere in an HTML template, and qri will replace them with values from your dataset


{{ allBodyEntries }}

load the full dataset body

{{ block "citation" . }}

html citation block, uses styles defined in stylesheet

{{ block "header" . }}

“title” info about a dataset

{{ block "stylesheet" . }}

minimal inline stylesheet used by the standard viz

{{ block "summary" . }}

html block of basic dataset info

{{ bodyEntries offset limit }}

get body entries within an offset/limit range. passing offset: 0, limit: -1 returns the entire body

{{ ds }}

the dataset being visualized, ds can have a number of components like commit, meta, transform, body, all of which have helpful fields for visualization. Details of the dataset document are outlined in the dataset document definition

{{ filesize }}

convert byte count to kb/mb/etc string

{{ title }}

give the title of a dataset