use latest date in rss
This commit is contained in:
parent
585706f1c5
commit
ca53ab5b8e
1 changed files with 5 additions and 4 deletions
|
@ -47,16 +47,17 @@ make' root ginfo@(GalleryInfo {title, desc, prefix}) output infos = [b|@0
|
|||
Just o -> [b|<atom:link href="$link/$o" rel="self" />|]
|
||||
|
||||
makeItem :: Strict.Text -> FilePath -> Bool -> FilePath -> Info -> Builder
|
||||
makeItem root prefix nsfw path i@(Info {title, date, artist}) = [b|@4
|
||||
makeItem root prefix nsfw path i@(Info {title, artist}) = [b|@4
|
||||
<item>
|
||||
<title>$title</title>
|
||||
<title>$title$up</title>
|
||||
<link>$link</link>
|
||||
<guid>$link</guid>
|
||||
$descArtist'
|
||||
<pubDate>$date'</pubDate>
|
||||
<pubDate>$date</pubDate>
|
||||
</item>
|
||||
|]
|
||||
where
|
||||
up = if #updated i nsfw then [b| (updated)|] else ""
|
||||
dir = takeDirectory path
|
||||
link = [b|$root/$prefix/$dir|]
|
||||
artist' = ifJust artist \case
|
||||
|
@ -73,7 +74,7 @@ makeItem root prefix nsfw path i@(Info {title, date, artist}) = [b|@4
|
|||
</description>
|
||||
|]
|
||||
else ""
|
||||
date' = formatRSS date
|
||||
date = formatRSS $ #latestDate i nsfw
|
||||
|
||||
makeDesc :: Desc -> Builder
|
||||
makeDesc NoDesc = ""
|
||||
|
|
Loading…
Reference in a new issue