             input-meta (meta-by-ext input-fs extensions)
             output-meta (doall
                          (for [{:keys [path parsed filename] :as entry*} input-meta]
-                           (let [page-filepath (string/replace path #"(?i).[a-z]+$" output-extension)
+                           (let [new-path (->> output-extension
+                                               (string/replace path #"(?i).[a-z]+$")
+                                               (perun/create-filepath (:out-dir options)))
                                  entry (-> entry*
-                                           (assoc :path page-filepath
-                                                  :original-path path)
-                                           (dissoc :parsed :original))]
-                             (perun/create-file tmp page-filepath parsed)
+                                           (dissoc :parsed :original)
+                                           (merge {:original-path path
+                                                   :out-dir (:out-dir options)}
+                                                  (pm/path-meta new-path global-meta)))]
+                             (perun/create-file tmp new-path parsed)
                              entry)))
             new-fs (-> input-fs
                        (commit tmp)

    [circleci/clj-yaml "0.5.5"]])

(def ^:private +markdown-defaults+
  {:meta {:original true
          :include-rss true
          :include-atom true}})


  files with extensions in `extensions`, adds `tracer` to `:io.perun/trace`
  and writes files for subsequent tasks to process, if desired. Pass
  `pod` if one is needed for parsing"
  [parse-form extensions output-extension tracer options & [pod]]
  (let [tmp     (boot/tmp-dir!)
        prev-fs (atom nil)]
    (boot/with-pre-wrap fileset
      (let [global-meta (pm/get-global-meta fileset)
            changed-meta* (meta-by-ext (boot/fileset-diff @prev-fs fileset :hash) extensions)
            changed-meta (trace tracer
                                (if pod
                                  (pod/with-call-in @pod ~(parse-form changed-meta*))
