summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-18 10:33:13 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-18 10:33:13 +0100
commit821dd38c138e33194105162f7ad4140c9c46fcf2 (patch)
tree70362cabaaa4adcc0b8d57b0439518e312e2e463
parent88b823eb5ee8f97bd7320fbcdec8037f46456d72 (diff)
downloadhakyll-821dd38c138e33194105162f7ad4140c9c46fcf2.tar.gz
Add some more defaults
-rw-r--r--src/Hakyll/Web.hs11
-rw-r--r--src/Hakyll/Web/CompressCss.hs2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Hakyll/Web.hs b/src/Hakyll/Web.hs
index 536abda..4172283 100644
--- a/src/Hakyll/Web.hs
+++ b/src/Hakyll/Web.hs
@@ -4,6 +4,8 @@ module Hakyll.Web
( defaultPageRead
, defaultTemplateRead
, defaultRelativizeUrls
+ , defaultCopyFile
+ , defaultCompressCss
) where
import Prelude hiding (id)
@@ -11,11 +13,14 @@ import Control.Category (id)
import Control.Arrow (arr, (>>>), (>>^), (&&&))
import Hakyll.Core.Compiler
+import Hakyll.Core.Writable
+import Hakyll.Core.Identifier
import Hakyll.Web.Page
import Hakyll.Web.Pandoc
import Hakyll.Web.Template
import Hakyll.Web.RelativizeUrls
import Hakyll.Web.Util.String
+import Hakyll.Web.CompressCss
defaultPageRead :: Compiler () (Page String)
defaultPageRead = cached "Hakyll.Web.defaultPageRead" $
@@ -30,3 +35,9 @@ defaultRelativizeUrls = getRoute &&& id >>^ uncurry relativize
defaultTemplateRead :: Compiler () Template
defaultTemplateRead = cached "Hakyll.Web.defaultTemplateRead" $
getResourceString >>^ readTemplate
+
+defaultCopyFile :: Compiler () CopyFile
+defaultCopyFile = getIdentifier >>^ CopyFile . toFilePath
+
+defaultCompressCss :: Compiler () String
+defaultCompressCss = getResourceString >>^ compressCss
diff --git a/src/Hakyll/Web/CompressCss.hs b/src/Hakyll/Web/CompressCss.hs
index 6e3b6f2..e138ea2 100644
--- a/src/Hakyll/Web/CompressCss.hs
+++ b/src/Hakyll/Web/CompressCss.hs
@@ -1,7 +1,7 @@
-- | Module used for CSS compression. The compression is currently in a simple
-- state, but would typically reduce the number of bytes by about 25%.
--
-module Text.Hakyll.Internal.CompressCss
+module Hakyll.Web.CompressCss
( compressCss
) where