From b3512e0372997bb3c117f1912ce18693b37ea502 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 Dec 2023 11:01:07 -0500 Subject: Add more detail to post-slug docs. --- doc/haunt.texi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/haunt.texi b/doc/haunt.texi index 50d1cf8..d19cf71 100644 --- a/doc/haunt.texi +++ b/doc/haunt.texi @@ -555,9 +555,11 @@ Return the metadata value corresponding to @var{key} within @var{post}. @end deffn -@deffn {Procedure} post-slug @var{post} -Transform the title of @var{post} into a URL slug suitable for the -file name of a web page. +@deffn {Procedure} post-slug post +Return a URL slug suitable for the file name of @var{post}. If a +custom @code{slug} metadata value exists for @var{post} then that is +returned. Otherwise, a slug is automatically generated from the +@code{title} metadata value. @end deffn The original @code{post-slug} procedure above has some less than ideal @@ -570,7 +572,10 @@ to @code{make-site}. @xref{Sites} for more information. @deffn {Procedure} post-slug-v2 post Transform the title of @var{post} into a URL slug. This second -revision does a better job than the original. +revision does a better job than the original. Like @code{post-slug}, +if a custom @code{slug} metadata value exists for @var{post} then that +is returned. Otherwise, a slug is automatically generated from the +@code{title} metadata value. @end deffn @defvr {Variable} %default-date -- cgit v1.2.3