From e6d60cdcb62e9e3fefa6be56124cc81c9072324c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 27 Dec 2023 17:43:28 -0500 Subject: builder: blog: Add #:post-prefix parameter. This allows for posts to be nested deeper than the collections. --- doc/haunt.texi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/haunt.texi b/doc/haunt.texi index cfeff16..178565a 100644 --- a/doc/haunt.texi +++ b/doc/haunt.texi @@ -851,8 +851,8 @@ output directory. By default, @var{dest} is @var{directory}. (use-modules (haunt builder blog)) @end example -@deffn {Procedure} theme [#:name #:layout #:post-template #:collection-template @ - #:pagination-template] +@deffn {Procedure} theme [#:name "Untitled"] [#:layout] [#:post-template] @ + [#:collection-template] [#:pagination-template] Create a new theme named @var{name}. The procedure @var{layout} accepts three arguments: a site, a page @@ -880,10 +880,14 @@ links. Return @code{#t} if @var{object} is a theme object. @end deffn -@deffn {Procedure} blog [#:theme #:prefix #:collections #:posts-per-page] +@deffn {Procedure} blog [#:theme] [#:prefix] [#:post-prefix] @ + [#:collections `(("Recent Posts" "index.html" ,posts/reverse-chronological))] @ + [#:posts-per-page] + Create a builder procedure that transforms a list of posts into pages decorated by @var{theme}, a theme object, whose URLs start with -@var{prefix}. +@var{prefix}. Post pages may be nested deeper in the file hierarchy +than collection pages by specifying the @var{post-prefix} argument. Additionally, this builder creates pages that aggregate previews of many posts corresponding to what is specified in the list -- cgit v1.2.3