about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/tazjin/atom-feed/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/users/tazjin/atom-feed/default.nix b/users/tazjin/atom-feed/default.nix
index 369295da280d..cd189b86754d 100644
--- a/users/tazjin/atom-feed/default.nix
+++ b/users/tazjin/atom-feed/default.nix
@@ -29,10 +29,8 @@ let
     # not be blank.
     title = string;
 
-    # Content of the entry. This element is technically optional, but
-    # only if an alternate link is provided. In practice it should
-    # always be present in the feeds generated by this code.
-    content = string;
+    # Content of the entry.
+    content = option string;
 
     # Indicates the last time the entry was modified in a significant
     # way (in seconds since epoch).
@@ -113,7 +111,11 @@ let
       ${elem "title" e.title}
       ${elem "id" e.id}
       ${elem "updated" (renderEpoch e.updated)}
-      <content type="html">${escape e.content}</content>
+      ${if e ? content
+        then ''<content type="html">${escape e.content}</content>''
+        else ""
+      }
+      ${if e ? summary then elem "summary" e.summary else ""}
       ${concatStrings (map renderAuthor (e.authors or []))}
       ${if e ? subtitle then elem "subtitle" e.subtitle else ""}
       ${if e ? rights then elem "rights" e.rights else ""}