             [dragon.web :as web]
             [mx.roads.forgotten.blog.cli.new :as new]
             [mx.roads.forgotten.blog.cli.show :as show]
-            [mx.roads.forgotten.blog.routes :refer [routes]]
+            [mx.roads.forgotten.blog.routes :refer [gen-routes routes]]
             [taoensso.timbre :as log]
             [trifl.core :refer [sys-prop]]
             [trifl.docs :as docs]))

  (case cmd
    :new (new/run args)
    :show (show/run args)
    :gen (gen/run (routes (config/posts-path)) (config/output-dir))
    :run (web/run (routes (config/posts-path)) (config/port) "blog")
    :help (help-cmd args)
    :version (version-cmd)
    ;; Aliases

  (let [version (System/getProperty "blog.version")
        build (util/get-build)]
    (print (format "FRMX Blog version %s, build %s\n" version build))))

(defn generate
  []
  (gen/run (gen-routes (config/posts-path)) (config/output-dir)))

(defn web
  []
  (web/run (routes (config/posts-path))
                  (config/port)
                  (config/output-dir)))

(defn run
  "
