Liking cljdoc? Tell your friends :D

mentat.clerk-utils

Utilities for writing docs and working with Clerk in a project that may or may not have Clerk on the classpath.

Expect this namespace to fission off into more specific namespaces as the catalogue of functions grows.

Utilities for writing docs and working with Clerk in a project that may or may
not have Clerk on the classpath.

Expect this namespace to fission off into more specific namespaces as the
catalogue of functions grows.
raw docstring

->clerkcljmacro

(->clerk & body)

If nextjournal.clerk is present on the classpath, acts as do for all supplied code forms in body. Else, acts like comment and elides its arguments.

Like comment, body must still be written in well-formed Clojure that can be parsed by the reader.

If `nextjournal.clerk` is present on the classpath, acts as `do` for all
supplied code forms in `body`. Else, acts like `comment` and elides its
arguments.

Like `comment`, body must still be written in well-formed Clojure that can be
parsed by the reader.
sourceraw docstring

->clerk-onlycljmacro

(->clerk-only & body)

If nextjournal.clerk is present on the classpath AND Clerk is evaluating body, acts as do for all supplied code forms in body. Else, acts like comment and elides its arguments.

Use this macro to supply examples and forms that should render in a Clerk environment but not affect normal Clojure evaluation in any way.

If `nextjournal.clerk` is present on the classpath AND Clerk is evaluating
`body`, acts as `do` for all supplied code forms in `body`. Else, acts like
`comment` and elides its arguments.

Use this macro to supply examples and forms that should render in a Clerk
environment but not affect normal Clojure evaluation in any way.
sourceraw docstring

cljscljmacro

(cljs & exprs)

Returns a form that executes all exprs in Clerk's SCI environment and renders the final form. If the final form evaluates to a vector, the vector is interpreted as a Reagent component.

Else, the form is presented with [v/inspect form]. (To present a vector, manually wrap the final form in [v/inspect ,,,].)

If nextjournal.clerk is not present on the classpath, acts as comment. See ->clerk for more detail.

Returns a form that executes all `exprs` in Clerk's SCI environment and renders
the final form. If the final form evaluates to a vector, the vector is
interpreted as a Reagent component.

Else, the form is presented with `[v/inspect form]`. (To present a vector,
manually wrap the final form in `[v/inspect ,,,]`.)

If `nextjournal.clerk` is not present on the classpath, acts as `comment`.
See [[->clerk]] for more detail.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close