{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Web.Geek.DefaultConfig where

import Air.Env (def)
import Prelude (Bool(..), IO)
import qualified Data.Map as Map
import Web.Geek.Type (Config(..), pretty_print_config)
import qualified Data.Text.IO as TextIO (putStrLn)

default_config :: Config
default_config = def
  {
    blog_directory = "blog"
  , post_directory = "posts"
  , post_date_format = "%Y-%m-%d-"
  , meta_tag_keyword = "categories"
  , meta_date_keyword = "date"
  , markup_engine_names = ["markdown"]
  , server_port = 3000
  , static_serve = Map.fromList _static_serve
  , maximum_number_of_posts_per_page = 20      
  , index_file_path = "blog/angular/app/index.html"
  , full_text_search = True
  , number_of_posts_per_feed = 20
  , rss_site_title = "Shinny blog"
  , rss_site_description = ""
  , rss_site_link = "http://localhost:3000"
  , rss_site_root_prefix = ""
  }
  where
    _static_serve = 
      [
        ( 
          "angular/app"
        , [ 
            "/css"
          , "/img"
          , "/js"
          , "/lib"
          , "/partials"
          , "/index.html"
          ]
        )
      
      , (
          "public"
        , [
            "/download"
          , "/images"
          , "/media"
          ]
        )
      ]

main :: IO ()
main = TextIO.putStrLn (pretty_print_config default_config)