Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

compile coffee script, run js & css through yui-compress (beats hakyl…

…l's compressCssCompiler, though is much slower)
  • Loading branch information...
commit e5e6dcc4fb4f25ecfe6b811614090b8efde4f14c 1 parent dca936b
Andy Irving authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/site.hs
View
16 src/site.hs
@@ -126,17 +126,17 @@ renderRevision rl = renderHtml $ H.tr $ do
main :: IO ()
main = hakyll $ do
- match "files/*" $ do
+ let static = route idRoute >> compile copyFileCompiler
+ mapM_ (`match` static ) ["files/**", "js/lib/*", "images/**"]
+ match "js/*.js" $ do
route idRoute
- compile copyFileCompiler
- match "js/**" $ do
- route idRoute
- compile copyFileCompiler
- -- apply unixFilter to compile coffeescript & minify js
- -- Compress CSS
+ compile $ getResourceString >>> unixFilter "yui-compressor" ["--type", "js"]
+ match "js/*.coffee" $ do
+ route $ setExtension "js"
+ compile $ getResourceString >>> unixFilter "coffee" ["--compile", "-s"] >>> unixFilter "yui-compressor" ["--type", "js"]
match "css/*" $ do
route idRoute
- compile compressCssCompiler
+ compile $ getResourceString >>> unixFilter "yui-compressor" ["--type", "css"]
match "about/*" $ do
route $ setExtension ".html"
Please sign in to comment.
Something went wrong with that request. Please try again.