diff --git a/CHANGELOG.md b/CHANGELOG.md index b01d5d1..4e2f418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Add `get_taxonomy_url` to retrieve the permalink of a tag/category - Fix bug when generating permalinks for taxonomies +- Change names of individual taxonomies to be plural (ie `tags/my-tag` instead of `tag/my-tag`) ## 0.2.2 (2017-11-01) diff --git a/components/taxonomies/src/lib.rs b/components/taxonomies/src/lib.rs index 3745e59..e85eb6c 100644 --- a/components/taxonomies/src/lib.rs +++ b/components/taxonomies/src/lib.rs @@ -188,27 +188,27 @@ mod tests { assert_eq!(tags.items[0].name, "db"); assert_eq!(tags.items[0].slug, "db"); - assert_eq!(tags.items[0].permalink, "http://a-website.com/tag/db/"); + assert_eq!(tags.items[0].permalink, "http://a-website.com/tags/db/"); assert_eq!(tags.items[0].pages.len(), 1); assert_eq!(tags.items[1].name, "js"); assert_eq!(tags.items[1].slug, "js"); - assert_eq!(tags.items[1].permalink, "http://a-website.com/tag/js/"); + assert_eq!(tags.items[1].permalink, "http://a-website.com/tags/js/"); assert_eq!(tags.items[1].pages.len(), 2); assert_eq!(tags.items[2].name, "rust"); assert_eq!(tags.items[2].slug, "rust"); - assert_eq!(tags.items[2].permalink, "http://a-website.com/tag/rust/"); + assert_eq!(tags.items[2].permalink, "http://a-website.com/tags/rust/"); assert_eq!(tags.items[2].pages.len(), 2); assert_eq!(categories.items[0].name, "Other"); assert_eq!(categories.items[0].slug, "other"); - assert_eq!(categories.items[0].permalink, "http://a-website.com/category/other/"); + assert_eq!(categories.items[0].permalink, "http://a-website.com/categories/other/"); assert_eq!(categories.items[0].pages.len(), 1); assert_eq!(categories.items[1].name, "Programming tutorials"); assert_eq!(categories.items[1].slug, "programming-tutorials"); - assert_eq!(categories.items[1].permalink, "http://a-website.com/category/programming-tutorials/"); + assert_eq!(categories.items[1].permalink, "http://a-website.com/categories/programming-tutorials/"); assert_eq!(categories.items[1].pages.len(), 1); } } diff --git a/components/templates/src/global_fns.rs b/components/templates/src/global_fns.rs index 41437f0..44284ff 100644 --- a/components/templates/src/global_fns.rs +++ b/components/templates/src/global_fns.rs @@ -179,7 +179,7 @@ mod tests { let mut args = HashMap::new(); args.insert("kind".to_string(), to_value("tag").unwrap()); args.insert("name".to_string(), to_value("Prog amming").unwrap()); - assert_eq!(static_fn(args).unwrap(), "http://a-website.com/tag/prog-amming/"); + assert_eq!(static_fn(args).unwrap(), "http://a-website.com/tags/prog-amming/"); // and errors if it can't find it let mut args = HashMap::new(); args.insert("kind".to_string(), to_value("tag").unwrap()); diff --git a/docs/content/documentation/content/tags-categories.md b/docs/content/documentation/content/tags-categories.md index 43ecadd..20eae9e 100644 --- a/docs/content/documentation/content/tags-categories.md +++ b/docs/content/documentation/content/tags-categories.md @@ -15,9 +15,9 @@ are available at the following paths: ```plain $BASE_URL/tags/ -$BASE_URL/tag/$TAG_SLUG +$BASE_URL/tags/$TAG_SLUG $BASE_URL/categories/ -$BASE_URL/category/$CATEGORY_SLUG +$BASE_URL/categories/$CATEGORY_SLUG ``` It is currently not possible to change those paths or to create custom taxonomies.