acatalepsie/src/Config.hs

43 lines
1.1 KiB
Haskell
Raw Normal View History

2020-09-25 23:45:58 +00:00
module Config (config, ropts, wopts, SiteConfig(..), def) where
import Data.Default
import Data.Text (Text)
import Text.Pandoc.Options as Pandoc
import Achille (Config(..))
import Route
2020-09-25 23:45:58 +00:00
config :: Achille.Config
config = def
{ deployCmd = Just "rsync -avzzr ~/dev/acatalepsie/_site/ --chmod=755 acatalepsie:/var/www/html"
2020-09-25 23:45:58 +00:00
, contentDir = root <> "content"
, outputDir = root <> "_site"
, cacheFile = root <> ".cache"
, ignore = [ "**/*.agdai"
, "**/*~"
]
2020-09-25 23:45:58 +00:00
} where root = "/home/flupe/dev/acatalepsie/"
ropts :: Pandoc.ReaderOptions
ropts = def { readerExtensions = pandocExtensions }
wopts :: Pandoc.WriterOptions
wopts = def { writerHTMLMathMethod = KaTeX "" }
data SiteConfig = SiteConfig
{ title :: Text
, description :: Text
, image :: Text
, route :: Route
2020-09-25 23:45:58 +00:00
}
instance Default SiteConfig where
def = SiteConfig
{ title = "sbbls"
, description = "my personal web space, for your enjoyment"
, image = "https://acatalepsie.fr/assets/card.png"
, route = IndexRoute
2020-09-25 23:45:58 +00:00
}