Liking cljdoc? Tell your friends :D

lambda-blog.middleware

Various entity transformers used in the generation pipelines.

Various entity transformers used in the generation pipelines.
raw docstring

add-pathsclj

(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/substituted 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.
sourceraw docstring

collect-tagsclj

(collect-tags {:keys [entries] :as ent})

Collects unique tags from each of the entries in the entity. Returns entity 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`.
sourceraw docstring

inspectclj

(inspect entity)

Pretty prints an entity for debugging purposes. Returns unmodified entity.

Pretty prints an `entity` for debugging purposes. Returns unmodified `entity`.
sourceraw docstring

(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.
sourceraw docstring

promoteclj

(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`.
sourceraw docstring

substituteclj

(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`.
sourceraw docstring

substitute-byclj

(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.
sourceraw docstring

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

× close