From 5d97b6a18ed21f5e83eea449497866425fbfd1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 30 Mar 2021 07:55:24 +0200 Subject: [PATCH] Add slice syntax to sections permalinks config Fixes #8363 --- content/en/content-management/urls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index 4389b1dca..4cba09232 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -83,7 +83,7 @@ The following is a list of values that can be used in a `permalink` definition i : the content's section `:sections` -: the content's sections hierarchy +: the content's sections hierarchy. {{< new-in "0.83.0" >}} Since Hugo 0.83 you can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact. `:title` : the content's title