From 15d86a5256bd6c486b0456b8a6b1f54846769e3b Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Mon, 6 Nov 2017 22:58:41 -0500 Subject: [PATCH] Handle Taxonomy permalinks Return the correct virtual Section for Taxonomy and TaxonomyTerm. Restrict permalink expansion to only Pages and Taxonomies, but then actually use expanded permalinks even for non-Pages. Fixes #1208. --- content/content-management/taxonomies.md | 2 +- content/content-management/urls.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/content/content-management/taxonomies.md b/content/content-management/taxonomies.md index 978814a26..0791590ae 100644 --- a/content/content-management/taxonomies.md +++ b/content/content-management/taxonomies.md @@ -132,7 +132,7 @@ Note that if you use `preserveTaxonomyNames` and intend to manually construct UR {{% note %}} You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose. -Note also that taxonomy [permalinks](/content-management/urls/) are *not* configurable. +Much like regular pages, taxonomy list [permalinks](/content-management/urls/) are configurable, but taxonomy term page permalinks are not. {{% /note %}} ## Add Taxonomies to Content diff --git a/content/content-management/urls.md b/content/content-management/urls.md index f7b8cba89..4be6b72d0 100644 --- a/content/content-management/urls.md +++ b/content/content-management/urls.md @@ -45,6 +45,8 @@ permalinks: Only the content under `post/` will have the new URL structure. For example, the file `content/post/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/2013/11/sample-entry/`. +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 The following is a list of values that can be used in a `permalink` definition in your site `config` file. All references to time are dependent on the content's date.