From 6e0a1f08635178ef90671865579d444666bda598 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 27 Dec 2023 17:43:09 -0500 Subject: post: Add post-slug-v2 procedure. --- doc/haunt.texi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/haunt.texi b/doc/haunt.texi index a612f35..cfeff16 100644 --- a/doc/haunt.texi +++ b/doc/haunt.texi @@ -560,6 +560,19 @@ Transform the title of @var{post} into a URL slug suitable for the file name of a web page. @end deffn +The original @code{post-slug} procedure above has some less than ideal +behavior. One issue is that version numbers like ``1.2.3'' get +transformed to ``123'' rather than something more sensible like +``1-2-3''. Unfortunately, changing this behavior would mean breaking +the URLs for existing Haunt sites. Instead, users may opt-in to using +@code{post-slug-v2} by passing it as the @code{#:make-slug} argument +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. +@end deffn + @defvr {Variable} %default-date The default date of a post when no other date is specified in the metadata association list. -- cgit v1.2.3