A small wrapper over pandoc's powerful Markdown -> Html
support with
usage tailored for Yesod.
import Yesod.Markdown
This is a fork and continuation of a package originally by Alexander Dunlap.
Differences include:
- Updated to compile with newer dependencies
- Removed
Yesod.Markdown.Macros
- Fixed and exported form field settings for
Markdown
fields - Uses xss-sanitize by default and provides
*Trusted
functions to skip it
getPageR :: FilePath -> Handler RepHtml
getPageR fp = do
content <- liftIO $ fmap markdownToHtml (markdownFromFile fp)
defaultLayout do
[shamlet|
<div class="content">
#{content}
|]
$ cabal install
$ cabal install yesod warp
$ runhaskell Test.hs
$ $BROWSER http://localhost:3000