(merge-page-sources sources)Merges collections of pages ensuring every path only occurs once across all collections.
Takes a map of collection name to page collection, and returns a map of path to content. The collection names are only used for error reporting.
For example,
(merge-page-sources
{:person-pages (create-person-pages)
:article-pages (create-article-pages)
:general-pages (create-general-pages)})
Merges collections of pages ensuring every path only occurs once across all
collections.
Takes a map of collection name to page collection, and returns a map of path
to content. The collection names are only used for error reporting.
For example,
(merge-page-sources
{:person-pages (create-person-pages)
:article-pages (create-article-pages)
:general-pages (create-general-pages)})(slurp-directory dir regexp & opts)Returns a map of paths to file contents in the dir. dir should be
accessible via clojure.java.io/as-file. regexp will be used to filter the
files. opts are passed to slurp to enable specification of encoding and
buffer-size etc.
Returns a map of paths to file contents in the `dir`. `dir` should be accessible via `clojure.java.io/as-file`. `regexp` will be used to filter the files. `opts` are passed to `slurp` to enable specification of encoding and buffer-size etc.
(slurp-resources dir regexp & opts)Returns a map of paths to file contents in the dir found on the resource
path. regexp will be used to filter the files. opts are passed to slurp
to enable specification of encoding and buffer-size etc.
Returns a map of paths to file contents in the `dir` found on the resource path. `regexp` will be used to filter the files. `opts` are passed to `slurp` to enable specification of encoding and buffer-size etc.
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 |