Liking cljdoc? Tell your friends :D

lucid.publish.collect.base


collect-article-metasclj

(collect-article-metas {:keys [articles] :as interim} name)

shunts :article directives into a seperate :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 seperate `:meta` section

(collect-article-metas
 {:articles {"example" {:elements [{:type :article
                                    :options {:color :light}}]}}}
 "example")
=> '{:articles {"example" {:elements []
                           :meta {:options {:color :light}}}}}
raw docstring

collect-citationsclj

(collect-citations {:keys [articles] :as interim} name)

shunts :citation directives into a seperate :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 seperate `:citation` section

(collect-citations
 {:articles {"example" {:elements [{:type :citation :author "Chris"}]}}}
 "example")
=> {:articles {"example" {:elements [],
                          :citations [{:type :citation, :author "Chris"}]}}}
raw docstring

collect-global-metasclj

(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}}}
raw docstring

collect-namespacesclj

(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}}}
raw docstring

collect-tagsclj

(collect-tags {:keys [articles] :as interim} name)

puts any element with :tag attribute into a seperate :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 seperate `: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"}}}}
raw docstring

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

× close