diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-04 02:22:54 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-04 07:43:47 +0100 |
commit | a42267246099b0d4d7467669bf09c830aab73d43 (patch) | |
tree | dd96aad634ca342ecb1d39fb784476e027d31dbf | |
parent | 18b1d5ebb9a903bc40325ac82c7df2b643301908 (diff) |
improve atom feedmain
-rw-r--r-- | app/Main.hs | 25 |
1 files 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 } ) |