diff --git a/components/config/src/config/taxonomies.rs b/components/config/src/config/taxonomies.rs index 46842b5d6..b19cd0f12 100644 --- a/components/config/src/config/taxonomies.rs +++ b/components/config/src/config/taxonomies.rs @@ -5,6 +5,8 @@ use serde::{Deserialize, Serialize}; pub struct TaxonomyConfig { /// The name used in the URL, usually the plural pub name: String, + /// The prefix used in the URL. + pub prefix: Option, /// The slug according to the config slugification strategy pub slug: String, /// If this is set, the list of individual taxonomy term page will be paginated @@ -21,6 +23,7 @@ impl Default for TaxonomyConfig { fn default() -> Self { Self { name: String::new(), + prefix: None, slug: String::new(), paginate_by: None, paginate_path: None, diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index cd48c219e..e36b7ce77 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -930,6 +930,10 @@ impl Site { components.push(taxonomy.lang.as_ref()); } + if let Some(prefix) = &taxonomy.kind.prefix { + components.push(prefix.as_ref()); + } + components.push(taxonomy.slug.as_ref()); let list_output =