Various entity transformers used in the generation pipelines.
Various entity transformers used in the generation pipelines.
(add-paths path-spec)
Returns a middleware function that adds paths to an entity
based on path-spec
(e.g. /{{value-1}}/{{value-2}}.html
). Each templated value is lambda-blog.utils/substitute
d into the path using entity
keys.
Returns a middleware function that adds paths to an `entity` based on `path-spec` (e.g. `/{{value-1}}/{{value-2}}.html`). Each templated value is [[lambda-blog.utils/substitute]]d into the path using `entity` keys.
(collect-tags {:keys [entries] :as ent})
Collects unique tags
from each of the entries
in the ent
ity. Returns ent
ity with collected tags stored under tags
.
Collects unique `tags` from each of the `entries` in the `ent`ity. Returns `ent`ity with collected tags stored under `tags`.
(inspect entity)
Pretty prints an entity
for debugging purposes. Returns unmodified entity
.
Pretty prints an `entity` for debugging purposes. Returns unmodified `entity`.
(link es)
Links all entities in es
by adding :previous
and :next
keys containing respective entities to each of them.
Links all entities in `es` by adding `:previous` and `:next` keys containing respective entities to each of them.
(promote what)
Returns a middleware function that promotes all subkeys of a map under what
key of an entity
into the entity
.
Returns a middleware function that promotes all subkeys of a map under `what` key of an `entity` into the `entity`.
(substitute what)
Returns a middleware function that substitutes each occurance of {{key}}
in (entity :what)
for the corresponding :key
of the entity
.
Returns a middleware function that substitutes each occurance of `{{key}}` in `(entity :what)` for the corresponding `:key` of the `entity`.
(substitute-by what)
Returns a middleware function that evaluates each occurance of {{expression}}
in (entity :what)
, applies it to entity
and substitutes original text for the result.
Returns a middleware function that **evaluates** each occurance of `{{expression}}` in `(entity :what)`, applies it to `entity` and substitutes original text for the result.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close