Automatic sorting, after creating a new page/chapter #1681

Closed
opened 2026-02-05 01:36:19 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @Biepa on GitHub (Apr 26, 2020).

Describe the feature you'd like
To save the last used sorting on a book, so when a new page/chapter is created, the page/chapter is inserted at the right place and not at the end of the list.

Describe the benefits this feature would bring to BookStack users
No manual sorting after every new page/chapter.

Additional context
Another idea is a global option you can choose, for the default sort and then a "custom sorting" option on a book/chapter, so a manual sorting is still possible. But that's maybe a lot more work.

Originally created by @Biepa on GitHub (Apr 26, 2020). **Describe the feature you'd like** To save the last used sorting on a book, so when a new page/chapter is created, the page/chapter is inserted at the right place and not at the end of the list. **Describe the benefits this feature would bring to BookStack users** No manual sorting after every new page/chapter. **Additional context** Another idea is a global option you can choose, for the default sort and then a "custom sorting" option on a book/chapter, so a manual sorting is still possible. But that's maybe a lot more work.
OVERLORD added the 🔨 Feature Request label 2026-02-05 01:36:19 +03:00
Author
Owner

@Rumcajsev commented on GitHub (Oct 19, 2020):

I agree. An example from my usage is having a new page for each retrospection, with date as a page name. It would be useful to automatically sort these - eg. by date of creation.

@Rumcajsev commented on GitHub (Oct 19, 2020): I agree. An example from my usage is having a new page for each retrospection, with date as a page name. It would be useful to automatically sort these - eg. by date of creation.
Author
Owner

@Stoicmaverick commented on GitHub (Jun 3, 2022):

I would really like to have the ability to order pages/books, as it would make finding specific pages much easier, paticularly on mobile, so you don't have to enlist your other hand to type out a search.

Maybe sorting options like Alphabetical, date accessed/created/edited, length. ect. I'm just a lowly soldering iron jockey, but I feel like this would be fairly simple to implement with low risk of bug introduction. I've seen several (MANY) requests for this, but I'd be willing to toss $10 in a bounty pool to have this implemented. (wait, can we start a bug/feature request bounty pool? I'm down.)

Also open in #180

@Stoicmaverick commented on GitHub (Jun 3, 2022): I would really like to have the ability to order pages/books, as it would make finding specific pages much easier, paticularly on mobile, so you don't have to enlist your other hand to type out a search. Maybe sorting options like Alphabetical, date accessed/created/edited, length. ect. I'm just a lowly soldering iron jockey, but I feel like this would be fairly simple to implement with low risk of bug introduction. I've seen several (MANY) requests for this, but I'd be willing to toss $10 in a bounty pool to have this implemented. (wait, can we start a bug/feature request bounty pool? I'm down.) Also open in #180
Author
Owner

@SteveDinn commented on GitHub (Nov 19, 2022):

I'm planning to use a shelf / book as a blog, so it'd be super cool if I could automatically have books and pages sort in reverse-chronological order automatically.

@SteveDinn commented on GitHub (Nov 19, 2022): I'm planning to use a shelf / book as a blog, so it'd be super cool if I could automatically have books and pages sort in reverse-chronological order automatically.
Author
Owner

@DanMundy commented on GitHub (Jan 18, 2023):

I'd also like this.

The granular sorting options are really good and I don't want this functionality to go away. I think it's a good default.

But there are some books where I want automatic sorting, and I want the chapters at the top. Currently I do the following steps every single time I create a new page, and it seems like something that I should be able to automate:

  1. Click Sort
  2. Click "Sort by name"
  3. Click "Show chapters first"
  4. Scroll right down to the bottom
  5. Click Save
@DanMundy commented on GitHub (Jan 18, 2023): I'd also like this. The granular sorting options are _really good_ and I don't want this functionality to go away. I think it's a good default. But there are some books where I want automatic sorting, and I want the chapters at the top. Currently I do the following steps _every single time I create a new page_, and it seems like something that I should be able to automate: 1. Click Sort 2. Click "Sort by name" 3. Click "Show chapters first" 4. Scroll right down to the bottom 5. Click Save
Author
Owner

@ssddanbrown commented on GitHub (Jan 22, 2023):

If anyone is really desperate for this, I've written up a logical theme system customization that can achieve this: https://gist.github.com/ssddanbrown/78553a39d36187476283a00fd67ed3dc

@DanMundy This follows your defined logic.

@ssddanbrown commented on GitHub (Jan 22, 2023): If anyone is really desperate for this, I've written up a logical theme system customization that can achieve this: https://gist.github.com/ssddanbrown/78553a39d36187476283a00fd67ed3dc @DanMundy This follows your defined logic.
Author
Owner

@ssddanbrown commented on GitHub (Feb 11, 2025):

Thanks for the original request @Biepa, and thanks for the input from everyone else.

Within #5457 I have added "Sort Rules", which allows an admin to centrally define sort operations which can be applied as a default for new books, assigned to existing books by book editors, or be mass assigned via command line.

This will be part of the next feature release.
Since this should cover the fundamental request here, I'll go ahead and close this off.

@ssddanbrown commented on GitHub (Feb 11, 2025): Thanks for the original request @Biepa, and thanks for the input from everyone else. Within #5457 I have added "Sort Rules", which allows an admin to centrally define sort operations which can be applied as a default for new books, assigned to existing books by book editors, or be mass assigned via command line. This will be part of the next feature release. Since this should cover the fundamental request here, I'll go ahead and close this off.
Author
Owner

@Biepa commented on GitHub (Feb 11, 2025):

Hey @ssddanbrown,
I don't use Bookstack currently. Not because I didn't liked but the usecase wasn't there anymore.
But I just wanted to thank you for building Bookstack and keep improving it over all the years.
Will come back whenever the need comes up again. 👍

@Biepa commented on GitHub (Feb 11, 2025): Hey @ssddanbrown, I don't use Bookstack currently. Not because I didn't liked but the usecase wasn't there anymore. But I just wanted to thank you for building Bookstack and keep improving it over all the years. Will come back whenever the need comes up again. 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1681