# Creating custom permalinks for each post category

**URL:** <https://talk.jekyllrb.com/t/creating-custom-permalinks-for-each-post-category/434>\
**Category:** Help\
**Created:** [April 14, 2017, 3:31pm UTC](https://talk.jekyllrb.com/t/creating-custom-permalinks-for-each-post-category/434 "2017-04-14T15:31:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mbrav](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mbrav/32/171_2.png) [@mbrav](https://talk.jekyllrb.com/u/mbrav)\
**Post date:** [April 15, 2017, 8:07pm UTC](https://talk.jekyllrb.com/t/creating-custom-permalinks-for-each-post-category/434/4 "2017-04-15T20:07:13Z")

</div>

This is great, thank you! There is one problem however. While the `defaults:` worked and both `journals` and `essays` now have the permalinks that I want, the `.md` files don’t get assigned to a category based on the directory name in which they are located in.

For example, when I apply the file structure that you suggested:

```auto
_posts
  \essays
    yyyy-mm-dd-your-essay-title.md
    yyyy-mm-dd-another-essay-title.md
    ...
  \journals
    yyyy-mm-dd-your-journal-title.md
    yyyy-mm-dd-another-journal-title.md
    ...

```

The `essays` are not present in `site.categories.essays` variable, nor are the `journals` in the `site.categories.journals` variable.

---

_[View the full topic](https://talk.jekyllrb.com/t/creating-custom-permalinks-for-each-post-category/434)._
