 
 (defn compile-file!
   [site-map build-root [page-record lines]]
-  (let [output (mk-output build-root (:path page-record))]
+  (let [output (build-path build-root (:path page-record))]
     (with-parent-dir output
       (fn []
         (with-open [writer (clojure.java.io/writer output)]

(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)])

    [:head [:title (:title page-record)]]
    [:body (md-to-html-string (join "\n" content-lines))]]))

(defn build-path
  [root path]
  (clojure.java.io/as-file
   (str (join "/" (cons root (drop 2 (fs/split (strip-extension path)))))
