   "Provides a function, html-parser, to create what could be considered the
    standard parser from a function which takes the body of a file as a string
    and returns html."
-  (:require (incise.parsers [utils :refer [meta->write-path]]
+  (:require (incise.parsers [utils :refer [meta->write-path
+                                           name-without-extension]]
                             [parse :refer [map->Parse
                                            record-parse
                                            publish-parse?]])

  (let [file-str (slurp file)
        parse-meta (merge (conf/get :parse-defaults)
                          (edn/read-string file-str))
        content (content-fn (second (s/split file-str #"\}" 2)))]
    (meta-and-content->Parse parse-meta content)))


  as html to the proper place under public. If it is a page it should appear at
  the root, if it is a post it will be placed under a directory strucutre based
  on its date."
  [parser-fn]
  (fn [file]
    (let [parse (File->Parse parser-fn file)]
      (when (publish-parse? parse)
        (record-parse (.getCanonicalPath file) parse)
        (delay [(write-Parse parse)])))))
