module Hakyll.Convert.Common where
import Data.Data
import Data.Default
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock (UTCTime)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
data DistilledPost = DistilledPost
{ dpUri :: String
, dpBody :: Text
, dpTitle :: Maybe Text
, dpTags :: [Text]
, dpCategories :: [Text]
, dpDate :: UTCTime
}
deriving (Data, Typeable)
instance Default DistilledPost where
def = DistilledPost
{ dpUri = ""
, dpBody = ""
, dpTitle = Nothing
, dpTags = []
, dpCategories = []
, dpDate = posixSecondsToUTCTime 0
}