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" />|]
|
Just o -> [b|<atom:link href="$link/$o" rel="self" />|]
|
||||||
|
|
||||||
makeItem :: Strict.Text -> FilePath -> Bool -> FilePath -> Info -> Builder
|
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>
|
<item>
|
||||||
<title>$title</title>
|
<title>$title$up</title>
|
||||||
<link>$link</link>
|
<link>$link</link>
|
||||||
<guid>$link</guid>
|
<guid>$link</guid>
|
||||||
$descArtist'
|
$descArtist'
|
||||||
<pubDate>$date'</pubDate>
|
<pubDate>$date</pubDate>
|
||||||
</item>
|
</item>
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
|
up = if #updated i nsfw then [b| (updated)|] else ""
|
||||||
dir = takeDirectory path
|
dir = takeDirectory path
|
||||||
link = [b|$root/$prefix/$dir|]
|
link = [b|$root/$prefix/$dir|]
|
||||||
artist' = ifJust artist \case
|
artist' = ifJust artist \case
|
||||||
|
@ -73,7 +74,7 @@ makeItem root prefix nsfw path i@(Info {title, date, artist}) = [b|@4
|
||||||
</description>
|
</description>
|
||||||
|]
|
|]
|
||||||
else ""
|
else ""
|
||||||
date' = formatRSS date
|
date = formatRSS $ #latestDate i nsfw
|
||||||
|
|
||||||
makeDesc :: Desc -> Builder
|
makeDesc :: Desc -> Builder
|
||||||
makeDesc NoDesc = ""
|
makeDesc NoDesc = ""
|
||||||
|
|
Loading…
Reference in a new issue