toPage :: UTCTime -> T.Text -> Maybe Page
toPage modtime fileContent =
  Page <$> fmap T.unpack (M.lookup "route" header)
       <*> M.lookup "title" header
       <*> pure (mkPreview header)
       <*> pure modtime
       <*> pure (createBody content')
    where (header, content') = (getHeader &&& getContent) fileContent
toPage :: UTCTime -> T.Text -> Maybe Page
toPage modtime fileContent =
  Page <$> fmap T.unpack (M.lookup "route" header)
       <*> M.lookup "title" header
       <*> pure (mkPreview header)
       <*> pure modtime
       <*> pure (createBody content')
    where (header, content') = (getHeader &&& getContent) fileContent
toPage modtime fileContent =
  Page <$> fmap T.unpack (M.lookup "route" header)
       <*> M.lookup "title" header
       <*> pure (mkPreview header)
       <*> pure modtime
       <*> pure (createBody content')
    where (header, content') = (getHeader &&& getContent) fileContent