2019-02-15 15:11:31 +01:00
|
|
|
module Blog.Path (
|
|
|
|
Path(..)
|
|
|
|
, build
|
|
|
|
) where
|
|
|
|
|
|
|
|
import Arguments (Arguments)
|
|
|
|
import qualified Arguments as Arguments (Arguments(..))
|
|
|
|
|
|
|
|
data Path = Path {
|
|
|
|
articlesPath :: FilePath
|
2019-02-16 08:13:14 +01:00
|
|
|
, commentsAt :: Maybe String
|
2019-02-15 15:11:31 +01:00
|
|
|
, pagesPath :: Maybe FilePath
|
|
|
|
, root :: FilePath
|
|
|
|
}
|
|
|
|
|
|
|
|
build :: Arguments -> Path
|
|
|
|
build arguments = Path {
|
|
|
|
articlesPath = Arguments.articlesPath arguments
|
2019-02-16 08:13:14 +01:00
|
|
|
, commentsAt = Arguments.commentsAt arguments
|
2019-02-15 15:11:31 +01:00
|
|
|
, pagesPath = Arguments.pagesPath arguments
|
|
|
|
, root = Arguments.sourceDir arguments
|
|
|
|
}
|