From 901adb07b74068a2fcc1b34dd28ff96863819f3b Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 12 Feb 2025 14:13:17 +0100 Subject: [PATCH] resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens See #11722 --- content/en/content-management/urls.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index ab0c7148a..62ccfb666 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -317,6 +317,14 @@ Use these tokens when defining the URL pattern. You can also use these tokens wh `:slugorfilename` : The slug as defined in front matter, else the content's file name without extension, applicable to the `page` page kind. +`:contentbasename` +: The content base name, as defined in [`File.ContentBaseName`], applicable to pages backed by a file. + +`:contentbasenameorslug` +: The content base name, else the slug as defined above. + +[`File.ContentBaseName`]: /methods/page/file/#contentbasename + For time-related values, you can also use the layout string components defined in Go's [time package]. For example: [time package]: https://pkg.go.dev/time#pkg-constants