The one ordered document corpus behind apropos(pattern) and doc(name).
Static resources and live sources contribute the same closed record shape. Invalid static records fail at load; invalid dynamic records are logged and dropped.
entries is the whole corpus in source order, deduplicated by EXACT name; pages
is the documentation subset the docs site renders. apropos applies one regular
expression to record names and preserves corpus order — there is no ranking,
tokenization, search index or classpath discovery. doc retrieves the same record
by name and prints its whole text.
The one ordered document corpus behind `apropos(pattern)` and `doc(name)`. Static resources and live sources contribute the same closed record shape. Invalid static records fail at load; invalid dynamic records are logged and dropped. `entries` is the whole corpus in source order, deduplicated by EXACT name; `pages` is the documentation subset the docs site renders. `apropos` applies one regular expression to record names and preserves corpus order — there is no ranking, tokenization, search index or classpath discovery. `doc` retrieves the same record by name and prints its whole text.
(body-text text)The opening of text as ONE line, capped at body-max-len: the body an
apropos row shows. Whitespace collapses so a wrapped docstring reads as the
sentence its author wrote. Skip a leading Markdown title when prose follows it,
so pages describe their purpose instead of repeating their name. The first
paragraph is enough; the complete document remains one doc(name) away.
The opening of `text` as ONE line, capped at `body-max-len`: the `body` an `apropos` row shows. Whitespace collapses so a wrapped docstring reads as the sentence its author wrote. Skip a leading Markdown title when prose follows it, so pages describe their purpose instead of repeating their name. The first paragraph is enough; the complete document remains one `doc(name)` away.
What doc() prints: a hand-ordered short list of the verbs a session starts
from, not a corpus dump. Everything else remains addressable through
apropos(pattern) and doc(name).
What `doc()` prints: a hand-ordered short list of the verbs a session starts from, not a corpus dump. Everything else remains addressable through `apropos(pattern)` and `doc(name)`.
(entries)The whole corpus, read from its plain ordered sources and deduplicated by name
(first wins). Every entry travels WHOLE, in the one shape :vis.doc/record
declares. A source that throws contributes nothing — discovery must never be the
reason an environment fails to build.
The whole corpus, read from its plain ordered sources and deduplicated by name (first wins). Every entry travels WHOLE, in the one shape `:vis.doc/record` declares. A source that throws contributes nothing — discovery must never be the reason an environment fails to build.
(entry-text entry)(entry-text {:keys [name text call params]} note)What doc(target) answers for one entry: the handle, the expression that
uses it when there is one, the keys that expression's options dict must carry,
then the WHOLE document. note is the caller's one-word remark about the
handle (env-python marks a live callable).
What `doc(target)` answers for one entry: the handle, the expression that uses it when there is one, the keys that expression's options dict must carry, then the WHOLE document. `note` is the caller's one-word remark about the handle (`env-python` marks a live callable).
(forget-records!)Drop the cached read so the next ask reaches for the resources again — what
/reload calls. In a binary the resources are frozen and this costs one re-read;
in a development JVM it is what makes an edited page visible without a restart.
Drop the cached read so the next ask reaches for the resources again — what `/reload` calls. In a binary the resources are frozen and this costs one re-read; in a development JVM it is what makes an edited page visible without a restart.
(gist text)(gist text max-len)The FIRST LINE of text, as a one-liner: leading markdown heading marks are
dropped (a page's first line is its # Title) and the result is capped at
gist-max-len — or at max-len, which the curated index tightens so twenty
rows stay scannable. This is the only place a gist exists — never a stored
field.
The FIRST LINE of `text`, as a one-liner: leading markdown heading marks are dropped (a page's first line is its `# Title`) and the result is capped at `gist-max-len` — or at `max-len`, which the curated index tightens so twenty rows stay scannable. This is the only place a gist exists — never a stored field.
(index-text es)What bare doc() answers: curated verbs that are actually present, one
name — first line per row. Everything else is one apropos(pattern) away.
What bare `doc()` answers: curated verbs that are actually present, one `name — first line` per row. Everything else is one `apropos(pattern)` away.
The closed vocabulary of :kind — what a document IS, which is how a reader
decides what to DO with it, and what doc RETURNS for it: function a
callable's docstring, class a class's, module an importable module's,
tool a Vis verb's contract, doc a whole documentation page, skill a whole
SKILL.md, local a callable this session defined that carries no contract at
all — reachable by name through doc, never returned by apropos.
The closed vocabulary of `:kind` — what a document IS, which is how a reader decides what to DO with it, and what `doc` RETURNS for it: `function` a callable's docstring, `class` a class's, `module` an importable module's, `tool` a Vis verb's contract, `doc` a whole documentation page, `skill` a whole `SKILL.md`, `local` a callable this session defined that carries no contract at all — reachable by name through `doc`, never returned by `apropos`.
(miss-text _es target)What doc(target) answers when nothing carries that handle.
What `doc(target)` answers when nothing carries that handle.
(normalize-name target)Coerce a caller's target to a comparable handle: unwrap the map/kwargs shape,
trim, drop a trailing .md (pages cross-link by filename), lower-case. This
is why doc("Index.md") and doc("index") are the same ask.
Coerce a caller's target to a comparable handle: unwrap the map/kwargs shape,
trim, drop a trailing `.md` (pages cross-link by filename), lower-case. This
is why `doc("Index.md")` and `doc("index")` are the same ask.(pages)Every documentation PAGE, in manifest order and whole — the corpus filtered to the
doc kind. The docs site renders from THIS: one read, one validation, one order,
and no second reader of the same resources.
Every documentation PAGE, in manifest order and whole — the corpus filtered to the `doc` kind. The docs site renders from THIS: one read, one validation, one order, and no second reader of the same resources.
(register-source! id entries-fn)Register a 0-arity entries-fn under id.
Sources are read directly whenever apropos or doc asks for the corpus.
Re-registering an id replaces it IN PLACE, so a reloaded namespace never
duplicates its own entries.
Register a 0-arity `entries-fn` under `id`. Sources are read directly whenever `apropos` or `doc` asks for the corpus. Re-registering an `id` replaces it IN PLACE, so a reloaded namespace never duplicates its own entries.
(search es pattern)Return entries whose :name contains a match for pattern, preserving corpus
order. A blank string lists every entry. Invalid regular expressions are errors.
Return entries whose `:name` contains a match for `pattern`, preserving corpus order. A blank string lists every entry. Invalid regular expressions are errors.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |