halipeto-2.2: Haskell Static Web Page Generator

Halipeto.Template

Documentation

type CustomFn s f = Context s f -> Arg -> IO (Context s f, Result s f)Source

data Result s f Source

Constructors

Attr Name String

Add an attribute

Text Position String

Add text

Xml Position [Element]

Add XML

Repeat (CustomFn s f)

Recurse on function

Continue

Process next attribute

Skip

Delete contents

data Position Source

Constructors

Before

Insert data before current contents

After

Insert data after current contents

Replace

Replace current contents

type UpdateDict s = s String -> [String] -> s StringSource

data Page s Source

Constructors

Page 

Fields

path :: [String]

Path to page

template :: String

Page template

dictionary :: UpdateDict s

State for page

Instances

Eq (Page s) 
Show (Page s) 

data TreeSite s Source

Constructors

TreeSite (Maybe (Page s)) [TreeSite s] 

Instances

data Context s f Source

Constructors

Ctx 

Fields

state :: s String

State dictionary

funcs :: f (CustomFn s f)

Functions dictionary

site :: TreeSite s

Site structure