Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
create an index for a directory in two steps: IndexCollect: collect all the date with call to addIndex2yam and indexMake: convert collected data for printing (convertIndexEntries) . the data is stored in a file separately and managed by Shake operates on metapage (or less? ) this could all be pure code?
Synopsis
- data MenuEntry = MenuEntry {
- menu2subdir :: [Index4html]
- menu2files :: [Index4html]
- data Index4html = Index4html {}
- convertIndexEntries :: NoticeLevel -> [Text] -> Text -> IndexEntry -> ErrIO MenuEntry
- convert2index :: [Text] -> Text -> (IndexEntry, [IndexEntry], [IndexEntry]) -> MenuEntry
- getIndexEntryPure :: [Text] -> [IndexEntry] -> [Index4html]
- getOneIndexEntryPure :: [Text] -> IndexEntry -> Index4html
- blankAuthorName :: [Text] -> Text -> Text
Documentation
MenuEntry | |
|
Instances
FromJSON MenuEntry Source # | |
ToJSON MenuEntry Source # | |
Defined in Lib.IndexMake | |
Generic MenuEntry Source # | |
Read MenuEntry Source # | |
Show MenuEntry Source # | |
Eq MenuEntry Source # | |
Ord MenuEntry Source # | |
Defined in Lib.IndexMake | |
Zeros MenuEntry Source # | |
type Rep MenuEntry Source # | |
Defined in Lib.IndexMake type Rep MenuEntry = D1 ('MetaData "MenuEntry" "Lib.IndexMake" "daino-0.1.5.2-BGWuqXC897kITybImSdur4" 'False) (C1 ('MetaCons "MenuEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "menu2subdir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Index4html]) :*: S1 ('MetaSel ('Just "menu2files") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Index4html]))) |
data Index4html Source #
the lines for the index TODO make a variant for the breaing marks
Instances
convertIndexEntries :: NoticeLevel -> [Text] -> Text -> IndexEntry -> ErrIO MenuEntry Source #
take the index entries and convert their form and push them back into the json converts to values for printing if indexpage else null date today is passed to feed in pages the authors which should be oppressed are passed is pure except for today! TODO today is not used use the date from the siteHeader? TODO
convert2index :: [Text] -> Text -> (IndexEntry, [IndexEntry], [IndexEntry]) -> MenuEntry Source #
convert the indexEntry1s and put some divider between TODO - avoid dividers if list empty
getIndexEntryPure :: [Text] -> [IndexEntry] -> [Index4html] Source #
getOneIndexEntryPure :: [Text] -> IndexEntry -> Index4html Source #
the pure code to compute an IndexEntry Text should be "BlogpostTufteStyled.html"