(link-anchors {:keys [anchors-lu articles] :as folio} name)creates a global anchors list based on the lookup
(-> {:articles {"example" {:elements [{:type :chapter :tag "hello" :number "1"}]}}} (link-anchors-lu "example") (link-anchors "example") :anchors) => {"example" {"hello" {:type :chapter, :tag "hello", :number "1"}}}
creates a global anchors list based on the lookup
(-> {:articles {"example" {:elements [{:type :chapter :tag "hello" :number "1"}]}}}
(link-anchors-lu "example")
(link-anchors "example")
:anchors)
=> {"example" {"hello" {:type :chapter, :tag "hello", :number "1"}}}(link-anchors-lu {:keys [articles] :as folio} name)creates the anchor lookup for tags and numbers (-> {:articles {"example" {:elements [{:type :chapter :tag "hello" :number "1"}]}}} (link-anchors-lu "example") :anchors-lu) => {"example" {:by-number {:chapter {"1" {:type :chapter, :tag "hello", :number "1"}}}, :by-tag {"hello" {:type :chapter, :tag "hello", :number "1"}}}}
creates the anchor lookup for tags and numbers
(-> {:articles {"example" {:elements [{:type :chapter :tag "hello" :number "1"}]}}}
(link-anchors-lu "example")
:anchors-lu)
=> {"example" {:by-number {:chapter {"1" {:type :chapter, :tag "hello", :number "1"}}},
:by-tag {"hello" {:type :chapter, :tag "hello", :number "1"}}}}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |