2

我正在尝试使用 noir 并遵循默认教程中给出的教程并使用此代码

(defpage "/my-page" []
  (html5
    [:h1 "This is my first page!"]))

但是,clojure 抛出错误并拒绝工作。

4

1 回答 1

5

What does your namespace declaration look like?

Chances are you're not useing defpage and html5.

defpage is in the noir.core namespace and html5 is either in the hiccup.page-helpers (hiccup version < 1) or hiccup.page (hiccup version >= 1) namespace.

If you used the noir template, there's a decent chance these were already included.

于 2012-07-09T20:04:20.340 回答