summaryrefslogtreecommitdiffstats
path: root/content/en/content-management/urls.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/en/content-management/urls.md')
-rw-r--r--content/en/content-management/urls.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md
index 9cb16f52d..14971af43 100644
--- a/content/en/content-management/urls.md
+++ b/content/en/content-management/urls.md
@@ -38,6 +38,13 @@ permalinks:
Only the content under `posts/` will have the new URL structure. For example, the file `content/posts/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.
+If the standard date-based permalink configuration does not meet your needs, you can also format URL segments using [Go time formatting directives](https://golang.org/pkg/time/#Time.Format). For example, a URL structure with two digit years and month and day digits without zero padding can be accomplished with:
+
+{{< code-toggle file="config" copy="false" >}}
+permalinks:
+ posts: /:06/:1/:2/:title/
+{{< /code-toggle >}}
+
You can also configure permalinks of taxonomies with the same syntax, by using the plural form of the taxonomy instead of the section. You will probably only want to use the configuration values `:slug` or `:title`.
### Permalink Configuration Values
@@ -80,6 +87,8 @@ The following is a list of values that can be used in a `permalink` definition i
`:filename`
: the content's filename (without extension)
+Additionally, a Go time format string prefixed with `:` may be used.
+
## Aliases
Aliases can be used to create redirects to your page from other URLs.