2

yesod wikiのyesodチュートリアルに沿ってフォローし、外部のcssフレームワーク(青写真)にリンクしている壁にぶつかっています。

スキャフォールディングツールを使用してサイトを作成しましたが、これまでのところ、「yesoddevel」を使用してすべてが正しく機能しています。

ブループリントファイルをstatic/css / blueprintにダウンロードし、default-layout-wrapper.hamletに以下を追加しました。

!!!
<html>
    <head
        <title>#{pageTitle pc}
        <link rel=stylesheet type=text/css media=screen href=@{StaticR css_blueprint_screen_css}>
        <link rel=stylesheet type=text/css media=print href=@{StaticR css_blueprint_print_css}>
        ^{pageHead pc}
    <body
        ^{pageBody pc}

私が得ているエラーは次のとおりです。

Foundation.hs:98:27:
    Not in scope: `css_blueprint_screen_css'
    In the result of the splice:
      $(hamletFile "hamlet/default-layout-wrapper.hamlet")
    To see what the splice expanded to, use -ddump-splices
    In the first argument of `hamletToRepHtml', namely
      `$(hamletFile "hamlet/default-layout-wrapper.hamlet")'
    In the expression:
      hamletToRepHtml
        ($(hamletFile "hamlet/default-layout-wrapper.hamlet"))

Foundation.hs:98:27:
    Not in scope: `css_blueprint_print_css'
    In the result of the splice:
      $(hamletFile "hamlet/default-layout-wrapper.hamlet")
    To see what the splice expanded to, use -ddump-splices
    In the first argument of `hamletToRepHtml', namely
      `$(hamletFile "hamlet/default-layout-wrapper.hamlet")'
    In the expression:
      hamletToRepHtml
        ($(hamletFile "hamlet/default-layout-wrapper.hamlet"))
Starting development server...

私はMacを使用していて、ghc-7.0.3を実行しています... StaticRがどのように機能するかは理解していると思いましたが、明らかに何かが足りません。何か案は?

よろしくお願いします、ニール

4

1 に答える 1

7

する必要がありtouch Settings/StaticFiles.hsますか? 一般に、yesod develまたはyesod build自動的に処理されますが、最初に頭に浮かぶのはそれです。

于 2011-10-16T02:45:17.813 に答える