 
    Make files permalinked. E.x. about.html will become about/index.html"
   [p permalink-fn PERMALINKFN code "function to build permalink from TmpFile metadata"
-   _ filterer     FILTER      code "filter function"]
+   _ filterer     FILTER      code "predicate to use for selecting entries (default: `identity`)"]
   (boot/with-pre-wrap fileset
     (let [options       (merge +permalink-defaults+ *opts*)
           files         (filter (:filterer options) (perun/get-meta fileset))

(deftask sitemap
  "Generate sitemap"
  [f filename FILENAME str  "generated sitemap filename"
   _ filterer FILTER   code "filter function"
   o target   OUTDIR   str  "the output directory"
   u url      URL      str  "base URL"]
  (let [pod     (create-pod sitemap-deps)

   :comparator (fn [i1 i2] (compare i2 i1))})

(deftask collection
  "Render single file for a collection of entries
  The symbol supplied as `renderer` should resolve to a function
  which will be called with a map containing the following keys:
   - `:meta`, global perun metadata
   - `:entries`, all entries

  Entries can optionally be filtered by supplying a function
  to the `filterer` option.

  The `sortby` and `groupby` functions can be used for ordering entries
  before rendering as well as rendering groups of entries to different pages."
  [o out-dir    OUTDIR     str  "the output directory"
   r renderer   RENDERER   sym  "page renderer (fully qualified symbol resolving to a function)"
   _ filterer   FILTER     code "predicate to use for selecting entries (default: `:content`)"
   s sortby     SORTBY     code "sort entries by function"
   g groupby    GROUPBY    code "group posts by function, keys are filenames, values are to-be-rendered entries"
   c comparator COMPARATOR code "sort by comparator function"
   p page       PAGE       str  "collection result page path"]
  (let [pods      (wrap-pool (pod/pod-pool (boot/get-env)))
