diff --git a/make-pages/RSS.hs b/make-pages/RSS.hs index 3739cda..d3b5160 100644 --- a/make-pages/RSS.hs +++ b/make-pages/RSS.hs @@ -26,11 +26,12 @@ make' :: Strict.Text -> Strict.Text -> GalleryInfo -> Maybe FilePath -> [(FilePath, Info)] -> Builder make' root name ginfo@(GalleryInfo {title, desc, prefix}) output infos = [b| - + - $name—$title + <![CDATA[$name—$title]]> $link - $desc + $selflink $items @@ -50,11 +51,12 @@ make' root name ginfo@(GalleryInfo {title, desc, prefix}) output infos = [b| makeItem :: Strict.Text -> FilePath -> Bool -> FilePath -> Info -> Builder makeItem root prefix nsfw path info@(Info {title}) = [b| - $title$suffix + <![CDATA[$title$suffix]]> $link $link - $body + $date + $body |] where @@ -77,6 +79,8 @@ makeItem root prefix nsfw path info@(Info {title}) = [b| dir = takeDirectory path link = [b|$root/$prefix/$dir|] + creator = maybe "niss" (.name) info.artist + date = formatRSS $ latestDateFor nsfw info artist = ifJust info.artist \case Artist name Nothing -> [b|

by $name|] @@ -92,5 +96,9 @@ makeItem root prefix nsfw path info@(Info {title}) = [b| makeDesc :: Desc -> Builder makeDesc NoDesc = "" makeDesc (TextDesc txt) = [b|$txt|] -makeDesc (LongDesc fs) = [b|

$fields
|] - where fields = map (\(DescField {name, text}) -> [b|
$name
$text|]) fs +makeDesc (LongDesc fs) = [b|
    $fields
|] where + fields = map mkField fs + mkField (DescField {name, text}) = [b| +
  • $name: + $text + |]