(collect-article-metas {:keys [articles] :as interim} name)
shunts :article
directives into a separate :meta
section
(collect-article-metas {:articles {"example" {:elements [{:type :article :options {:color :light}}]}}} "example") => '{:articles {"example" {:elements [] :meta {:options {:color :light}}}}}
shunts `:article` directives into a separate `:meta` section (collect-article-metas {:articles {"example" {:elements [{:type :article :options {:color :light}}]}}} "example") => '{:articles {"example" {:elements [] :meta {:options {:color :light}}}}}
(collect-citations {:keys [articles] :as interim} name)
shunts :citation
directives into a separate :citation
section
(collect-citations {:articles {"example" {:elements [{:type :citation :author "Chris"}]}}} "example") => {:articles {"example" {:elements [], :citations [{:type :citation, :author "Chris"}]}}}
shunts `:citation` directives into a separate `:citation` section (collect-citations {:articles {"example" {:elements [{:type :citation :author "Chris"}]}}} "example") => {:articles {"example" {:elements [], :citations [{:type :citation, :author "Chris"}]}}}
(collect-global-metas {:keys [articles] :as interim} name)
shunts :global
directives into a globally available :meta
section
(collect-global-metas {:articles {"example" {:elements [{:type :global :options {:color :light}}]}}} "example") => {:articles {"example" {:elements ()}} :global {:options {:color :light}}}
shunts `:global` directives into a globally available `:meta` section (collect-global-metas {:articles {"example" {:elements [{:type :global :options {:color :light}}]}}} "example") => {:articles {"example" {:elements ()}} :global {:options {:color :light}}}
(collect-namespaces {:keys [articles] :as interim} name)
combines :ns-form
directives into a namespace map for easy referral
(collect-namespaces {:articles {"example" {:elements [{:type :ns-form :ns 'clojure.core}]}}} "example") => '{:articles {"example" {:elements () :meta {}}} :namespaces {clojure.core {:type :ns-form :ns clojure.core}}}
combines `:ns-form` directives into a namespace map for easy referral (collect-namespaces {:articles {"example" {:elements [{:type :ns-form :ns 'clojure.core}]}}} "example") => '{:articles {"example" {:elements () :meta {}}} :namespaces {clojure.core {:type :ns-form :ns clojure.core}}}
(collect-tags {:keys [articles] :as interim} name)
puts any element with :tag
attribute into a separate :tag
set
(collect-tags {:articles {"example" {:elements [{:type :chapter :tag "hello"} {:type :chapter :tag "world"}]}}} "example") => {:articles {"example" {:elements [{:type :chapter :tag "hello"} {:type :chapter :tag "world"}] :tags #{"hello" "world"}}}}
puts any element with `:tag` attribute into a separate `:tag` set (collect-tags {:articles {"example" {:elements [{:type :chapter :tag "hello"} {:type :chapter :tag "world"}]}}} "example") => {:articles {"example" {:elements [{:type :chapter :tag "hello"} {:type :chapter :tag "world"}] :tags #{"hello" "world"}}}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close