Lykah-0.0.2: A static website and blog generator

Safe HaskellNone
LanguageHaskell2010

Lykah.Structure

Description

Types for the website's structure: Website, Theme, Pages, Types

Synopsis

Documentation

type SHtml2 a b = EHtml (Website, PathedPage a) b Source #

eigentlich sollte das `HTML Template` heißen. TODO

type SHtml a = SHtml2 a () Source #

data Theme Source #

Constructors

Theme 

Fields

  • tAssets :: Assets
     
  • tPage :: forall a. SHtml a -> SHtml a

    the first argument is an explicit body. This is needed because the body of current asset (in the enviromnent) should be used in a static fashion and not used for thinks like `tPage . tPost`

  • tPost :: Bool -> SHtml Post

    Template for post rendering, with the first argument indicating full page or single blog entry

  • tMenuItem :: forall a. Int -> Bool -> PathedPage () -> SHtml a

    first arg: one-based index of the current item

    second arg: menu item for current page?

Instances

data Page a Source #

Constructors

Page 

Fields

Instances

Show a => Show (Page a) Source # 

Methods

showsPrec :: Int -> Page a -> ShowS #

show :: Page a -> String #

showList :: [Page a] -> ShowS #

mapSHtml_old :: (Page b -> Page a) -> SHtml a -> SHtml b Source #

localSHtml :: (Pathed (Page b) -> Pathed (Page a)) -> SHtml a -> SHtml b Source #

withPage :: Page a -> SHtml a -> SHtml b Source #

withBody Source #

Arguments

:: SHtml a

Body

-> SHtml a

Template that uses Body

-> SHtml a

Result

relax :: SHtml () -> SHtml a Source #

data Post Source #

Constructors

Post 

Fields

Instances

readDetails :: (MonadReader (Env (a1, Pathed (Page b))) m, MonadTrans t) => (b -> a) -> t m a Source #

readTheme :: (MonadReader (Env (Website, b1)) m, MonadTrans t) => (Theme -> a) -> t m a Source #

page Source #

Arguments

:: Identifier 
-> Html

title

-> FilePath

path

-> Maybe (Pathed ())

parent

-> SHtml ()

body

-> PathedPage () 

post Source #

Arguments

:: Identifier 
-> FilePath

path

-> String

zoned time in "%Y-%m-%d %H:%M %Z" format

-> Html

title

-> Maybe (Pathed a)

parent

-> SHtml Post

body

-> PathedPage Post 

renders a subset of posts

menu :: SHtml a Source #

Generates the Menu