 (defn page-record? [x] (and (coll? x) (contains? x :mod-time)))
 
 (defn build-file!
-  "Merge the hash from the meta-information lines of `file` with useful
-  file-system information, such as the path and url relative to the root."
   [file lines]
   [(mk-page-record file lines)
    (content-section lines)])

  [root-dir]
  (map-directory! build-file! content-file? root-dir))

;; A site is our primary way of keeping track of content files as they
;; change.

(defn conj-site-map
  [site-map page-record]
  (assoc-in site-map
            (map keyword (fs/split (:path page-record)))
            page-record))

(defn build-site-map!
  "Creates a nested persistent map where the keys are filenames and directory
  names, and entries are maps of the same type, or file records."
  [root-dir]
  (reset! *site-map*
          (let [root-part (first (fs/split root-dir))]
            (get (reduce #(conj-site-map %1 (first %2))
                         {}
                         (build-files! root-dir))
                 (keyword root-part)))))

                         site-map))

(defmulti render-file
  (comp fs/extension :path))

(defmethod render-file ".md"
