summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/haunt.texi36
-rw-r--r--haunt/builder/rss.scm15
2 files changed, 47 insertions, 4 deletions
diff --git a/doc/haunt.texi b/doc/haunt.texi
index 9ba21ed..6f9d226 100644
--- a/doc/haunt.texi
+++ b/doc/haunt.texi
@@ -820,6 +820,7 @@ specification of Markdown, learn more about CommomMark
* Static Assets:: Images, CSS, JavaScript, etc.
* Blog:: Dear diary...
* Atom:: Atom feeds.
+* RSS:: RSS feeds.
@end menu
Builders are procedures that return one or more artifacts
@@ -982,6 +983,41 @@ prefix and post prefix. @xref{Blog} for more information.
@end deffn
+@node RSS
+@subsection RSS
+
+@example
+(use-modules (haunt builder rss))
+@end example
+
+@deffn {Procedure} rss-feed [#:file-name "rss-feed.xml"] [#:subtitle "Recent Posts"] @
+ [#:filter posts/reverse-chronological] @
+ [#:max-entries 20] [#:blog-prefix ""]
+Return a builder procedure that renders a list of posts as an RSS
+feed. All arguments are optional:
+
+@table @var
+
+@item file-name
+The page file name.
+
+@item subtitle
+The feed subtitle.
+
+@item filter
+The procedure called to manipulate the posts list before rendering.
+
+@item max-entries
+The maximum number of posts to render in the feed.
+
+@item blog-prefix
+The prefix for all post URLs, which is the combination of the blog's
+prefix and post prefix. @xref{Blog} for more information.
+
+@end table
+
+@end deffn
+
@node Publishers
@section Publishers
diff --git a/haunt/builder/rss.scm b/haunt/builder/rss.scm
index c1bafef..d614d9d 100644
--- a/haunt/builder/rss.scm
+++ b/haunt/builder/rss.scm
@@ -96,10 +96,17 @@
"Return a builder procedure that renders a list of posts as an RSS
feed. All arguments are optional:
-FILE-NAME: The page file name
-SUBTITLE: The feed subtitle
-FILTER: The procedure called to manipulate the posts list before rendering
-MAX-ENTRIES: The maximum number of posts to render in the feed"
+FILE-NAME: The page file name.
+
+SUBTITLE: The feed subtitle.
+
+FILTER: The procedure called to manipulate the posts list before
+rendering.
+
+MAX-ENTRIES: The maximum number of posts to render in the feed.
+
+BLOG-PREFIX: The prefix for all post URLs, which is the combination of
+the blog's prefix and post prefix."
(lambda (site posts)
(serialized-artifact file-name
`(rss (@ (version "2.0")