diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-12-28 11:01:07 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-12-28 11:01:07 -0500 |
commit | b3512e0372997bb3c117f1912ce18693b37ea502 (patch) | |
tree | 853995196c64ff3803750d341f9cb52242bf021a /doc | |
parent | bdf0ebe0e4e90b14812bccd5bf25d0aeac9ab7b2 (diff) |
Add more detail to post-slug docs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/haunt.texi | 13 |
1 files changed, 9 insertions, 4 deletions
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 |