diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-12-28 08:42:43 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-12-28 08:50:36 -0500 |
commit | d96ff37148ddb73291a5dbad6bbc43e05afac22b (patch) | |
tree | 038c05c8afb11e58f8afdf4e02f975f7f099e5ef | |
parent | 1997825c1f14d7e5215b60f4b8b0060461ebbbbe (diff) |
Document RSS builder.
-rw-r--r-- | doc/haunt.texi | 36 | ||||
-rw-r--r-- | haunt/builder/rss.scm | 15 |
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") |