From a42267246099b0d4d7467669bf09c830aab73d43 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 4 Mar 2024 02:22:54 +0100 Subject: improve atom feed --- app/Main.hs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 4e9b373..a3d1355 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -87,15 +87,32 @@ app req resp = do AtomEntry { entryAuthors = [], entryCategories = [], - entryContent = AtomContentInlineText TypeText <$> (snd commit.message), + entryContent = + AtomContentInlineText + TypeText + <$> (snd commit.message), entryContributors = [], - entryId = "feed.nomath.org/" <> commit.repository <> "/" <> commit.hash, + entryId = + "feed.nomath.org/" + <> commit.repository + <> "/" + <> commit.hash, entryLinks = [], entryPublished = Nothing, entryRights = Nothing, entrySource = Nothing, - entrySummary = Nothing, - entryTitle = AtomPlainText TypeText (fst commit.message), + entrySummary = + Just + . AtomPlainText TypeText + . fromMaybe "(no further content)" + $ snd commit.message, + entryTitle = + AtomPlainText + TypeText + ( (commit.repository <> " ") + <> (commit.branch <> ": ") + <> fst commit.message + ), entryUpdated = commit.createdAt } ) -- cgit v1.2.3