@@ -8,6 +8,7 @@ module Hakyll.Core.Compiler
8 , runCompiler
8 , runCompiler
13import Control.Arrow (second)
14import Control.Arrow (second)
@@ -18,6 +19,7 @@ import Data.Set (Set)
18import qualified Data.Set as S
19import qualified Data.Set as S
20import Hakyll.Core.Identifier
21import Hakyll.Core.Identifier
22+import Hakyll.Core.Target
21import Hakyll.Core.Target.Internal
23import Hakyll.Core.Target.Internal
23-- | A set of dependencies
25-- | A set of dependencies
@@ -78,3 +80,10 @@ require identifier = do
79target :: TargetM a a -> Compiler a
81target :: TargetM a a -> Compiler a
80target = return
82target = return
84+-- | Construct a target from a string, this string being the content of the
87+targetFromString :: (String -> TargetM a a) -- ^ Function to create the target
88+ -> Compiler a -- ^ Resulting compiler
89+targetFromString = target . (getResourceString >>=)