add gallery description
This commit is contained in:
parent
c10a3ab340
commit
c2f991bc3e
2 changed files with 7 additions and 5 deletions
|
@ -147,9 +147,10 @@ instance FromYAML Link where
|
|||
|
||||
data GalleryInfo =
|
||||
GalleryInfo {
|
||||
title :: !Text,
|
||||
prefix :: !FilePath,
|
||||
filters :: !GalleryFilters
|
||||
title :: !Text,
|
||||
description :: !Text,
|
||||
prefix :: !FilePath,
|
||||
filters :: !GalleryFilters
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
@ -189,6 +190,7 @@ matchFilters (GalleryFilters {nsfw, whose}) i =
|
|||
instance FromYAML GalleryInfo where
|
||||
parseYAML = YAML.withMap "gallery info" \m ->
|
||||
GalleryInfo <$> m .: "title"
|
||||
<*> m .: "description"
|
||||
<*> m .: "prefix"
|
||||
<*> m .:? "filters" .!= noFilters
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue