28 lines
624 B
Haskell
28 lines
624 B
Haskell
module Mock.Collection (
|
|
main
|
|
, testing
|
|
) where
|
|
|
|
import Blog (Blog(..), Path(..))
|
|
import Collection (Collection(..))
|
|
import Data.Map as Map (elems)
|
|
import qualified Mock.Blog (simple)
|
|
import System.FilePath ((</>))
|
|
|
|
main :: IO Collection
|
|
main = do
|
|
blog <- Mock.Blog.simple
|
|
return $ Collection {
|
|
featured = Map.elems $ articles blog
|
|
, basePath = root $ path blog
|
|
, tag = Nothing
|
|
}
|
|
|
|
testing :: IO Collection
|
|
testing = do
|
|
blog <- Mock.Blog.simple
|
|
return $ Collection {
|
|
featured = Map.elems $ articles blog
|
|
, basePath = root (path blog) </> "testing"
|
|
, tag = Just "testing"
|
|
}
|