   "Sets a custom message for each needed HTTP status.
   The message to be assigned is extracted with a dynamically generated key"
   [code]
-  (let [message (get-message (keyword (str "status-" code)))]
-    (layout message
-            [:article [:h1 message]])))
+  {:status code
+   :body (let [message (get-message (keyword (str "status-" code)))]
+           (layout message
+                   [:article [:h1 message]]))})
 
 (defn redirect [url]
   {:status 302

            (response 500))))

  (route/resources "/")
  (route/not-found "Not Found"))

(def app
  (handler/site app-routes))

  containing the markdown text (to keep all chars unescaped)"
  ([cls input] (md-node cls {} input))
  ([cls opts input]
   [(keyword (str (name cls) ".markdown")) opts
    [:textarea input]]))

(when-not (storage/valid-publisher? "NoteHub")
  (storage/register-publisher "NoteHub"))
