heckle-2.0.1.3: Jekyll in Haskell (feat. LaTeX)

Safe HaskellNone
LanguageHaskell2010

Heckle

Contents

Synopsis

Documentation

data Format Source #

Constructors

LaTeX 
Markdown 

Instances

newtype Title Source #

Constructors

Title 

Fields

data Post Source #

Constructors

Post 

Instances

Eq Post Source # 

Methods

(==) :: Post -> Post -> Bool #

(/=) :: Post -> Post -> Bool #

Ord Post Source # 

Methods

compare :: Post -> Post -> Ordering #

(<) :: Post -> Post -> Bool #

(<=) :: Post -> Post -> Bool #

(>) :: Post -> Post -> Bool #

(>=) :: Post -> Post -> Bool #

max :: Post -> Post -> Post #

min :: Post -> Post -> Post #

Show Post Source # 

Methods

showsPrec :: Int -> Post -> ShowS #

show :: Post -> String #

showList :: [Post] -> ShowS #

parseAbsoluteDate :: String -> Either String DateTime Source #

Relative dates aren't supported by BlaTeX (it makes no sense for a post to always be written "yesterday", a specific date should be given) However parsing the date requires the current datetime to be given to parse relative dates.

Originally I went through the IO hurdles of getting current datetime, but that introduced unnecessary side-effects so this is just a cleaner function to parse absolute dates. (It will give nonsensical results for relative dates: use carefully!)

I also wanted to stick with strings for error messages, so this just shows the ParseErrors from parseDate

createPost :: Show a => Format -> String -> Either a Pandoc -> Either String Post Source #

Creates a post given a constructor for a post

Orphan instances