@@ -89,6 +89,7 @@ module Hakyll.Core.Compiler
89 ( Compiler
89 ( Compiler
90 , runCompiler
90 , runCompiler
91 , getIdentifier
91 , getIdentifier
92 , getRoute
93 , getRoute
93 , getRouteFor
94 , getRouteFor
94 , getResourceString
95 , getResourceString
@@ -165,6 +166,13 @@ runCompiler compiler identifier provider routes store modified logger = do
165getIdentifier :: Compiler a Identifier
166getIdentifier :: Compiler a Identifier
166getIdentifier = fromJob $ const $ CompilerM $ compilerIdentifier <$> ask
167getIdentifier = fromJob $ const $ CompilerM $ compilerIdentifier <$> ask
169+-- | Get all identifiers matching the given pattern
171+getIdentifiers :: Pattern -> Compiler a [Identifier]
172+getIdentifiers pattern = fromJob $ const $ CompilerM $
173+ matches pattern . map unResource . resourceList
174+ . compilerResourceProvider <$> ask
168-- | Get the route we are using for this item
176-- | Get the route we are using for this item
170getRoute :: Compiler a (Maybe FilePath)
178getRoute :: Compiler a (Maybe FilePath)