# Allowing sorting by title

**URL:** <https://zola.discourse.group/t/allowing-sorting-by-title/369>\
**Category:** Feature requests\
**Created:** [April 2, 2020, 5:41pm UTC](https://zola.discourse.group/t/allowing-sorting-by-title/369 "2020-04-02T17:41:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielhamngren](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/danielhamngren/32/173_2.png) [@danielhamngren](https://zola.discourse.group/u/danielhamngren)\
**Post date:** [April 2, 2020, 5:41pm UTC](https://zola.discourse.group/t/allowing-sorting-by-title/369/1 "2020-04-02T17:41:25Z")

</div>

I am having a use case where it would be valuable for me to sort sections by the title in the front matter. Meaning sorting in alphabetical order.

After looking through the code base, I figured I could probably implement this change.

There are two hurdles I see:

1. I would probably add another pair in the same sense as page.later/page.earlier and page.heavier/page.lighter. I saw in [this pull request](https://github.com/getzola/zola/pull/352) that page.next and page.previous was removed. When sorting by title I would probably reintroduce them. I welcome any and all suggestions about better semantics.

2. Is this something only I would have use for? I couldn’t see any other issues regarding this and I don’t know if this possibility exists in other static site generators.

Would this change be something that would be appreciated?

---

<div class="post-metadata">

**Author:** ![Tecknet](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/tecknet/32/281_2.png) [@Tecknet](https://zola.discourse.group/u/Tecknet)\
**Post date:** [July 30, 2020, 5:30pm UTC](https://zola.discourse.group/t/allowing-sorting-by-title/369/2 "2020-07-30T17:30:15Z")

</div>

Sort by title would be useful for me. Also, would love to be able to sort by any metadata/frontmater on the page. I’ve got an item under `[extra]` that I’d like to sort by.

---

<div class="post-metadata">

**Author:** ![xpe](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/xpe/32/416_2.png) [@xpe](https://zola.discourse.group/u/xpe)\
**Post date:** [January 18, 2021, 4:15pm UTC](https://zola.discourse.group/t/allowing-sorting-by-title/369/3 "2021-01-18T16:15:43Z")

</div>

I also need sorting by title. I have a section of my site that has a list of terms, so it is natural for its index page to sort the terms by title.

I’ve implemented sorting by title on my Zola fork:

> **[xpe/zola](https://github.com/xpe/zola/tree/sort_by_title)**
>
> sort\_by\_title

---

<div class="post-metadata">

**Author:** ![xpe](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/xpe/32/416_2.png) [@xpe](https://zola.discourse.group/u/xpe)\
**Post date:** [January 18, 2021, 4:22pm UTC](https://zola.discourse.group/t/allowing-sorting-by-title/369/4 "2021-01-18T16:22:41Z")

</div>

PR created at [Add sort\_by title by xpe · Pull Request #1315 · getzola/zola · GitHub](https://github.com/getzola/zola/pull/1315)
