    s sortby     SORTBY     code  "sort entries by function"
    c comparator COMPARATOR code  "sort by comparator function"
    m meta       META       edn   "metadata to set on each collection entry"]
-  (let [{:keys [sortby comparator page-size prefix] :as options} (merge +paginate-defaults+ *opts*)
+  (let [{:keys [sortby comparator page-size prefix] :as options*} (merge +paginate-defaults+ *opts*)
         grouper (fn [entries]
                   (->> entries
                        (sort-by sortby comparator)

  `assortment` for more info)

  Returns a boot `with-pre-wrap` result"
  [{{:keys [comparator filterer sortby meta renderer] :as options*} :options
    :keys [task-name tracer grouper]}]
  (cond (not (fn? comparator))
        (u/fail (str task-name " task :comparator option should implement Fn\n"))
        (not (ifn? filterer))

                       (map-indexed #(-> [(str prefix (inc %1) ".html")
                                          {:entry {:page (inc %1)}
                                           :entries %2}]))
                       (into {})))
        options (assoc options*
                       :task-name "paginate"
                       :tracer :io.perun/paginate
                       :grouper grouper)]
    (assortment-pre-wrap options)))

(def +inject-scripts-defaults+
  {:extensions [".html"]})
