add extra link support to index page

This commit is contained in:
Rhiannon Morris 2020-07-19 12:22:02 +02:00
parent 980d790874
commit 5a1181ec76
3 changed files with 63 additions and 30 deletions

View file

@ -200,7 +200,8 @@ data IndexInfo =
IndexInfo {
title :: !Text,
galleries :: ![GalleryInfo],
footer :: !Text
links :: ![Link],
footer :: !(Maybe Text)
}
deriving Show
@ -208,7 +209,8 @@ instance FromYAML IndexInfo where
parseYAML = YAML.withMap "index info" \m ->
IndexInfo <$> m .: "title"
<*> m .:? "galleries" .!= []
<*> m .:? "footer" .!= ""
<*> m .:? "links" .!= []
<*> m .:? "footer"
data Pair a b = Pair !a !b