Ability to modify slugs and use numeric ones #3385

Open
opened 2026-02-05 06:34:17 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @MarkWatt3295 on GitHub (Dec 6, 2022).

Describe the feature you'd like

Would it be possible to have slugs modifiable? Either in an admin screen or the ability to switch to numeric auto incrementing slugs for books.

For my use case I am using bookstack as a public FAQ system. In our old system an FAQ had a numberic ID which was easy for a customer to reference on a phone call. For example you could tell the person to look at book 113 and they could add that to the url.

Describe the benefits this would bring to existing BookStack users

This feature may be useful for other users doing similar tasks. You also end up with shorter URLs as there is less text.

Can the goal of this request already be achieved via other means?

Currently somebody would have to manually go into the database and change slugs to numbers. Doing this can quickly cause slugs to go out of sync. It would also be much nicer to allow this to all be done in the front end.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

Originally created by @MarkWatt3295 on GitHub (Dec 6, 2022). ### Describe the feature you'd like Would it be possible to have slugs modifiable? Either in an admin screen or the ability to switch to numeric auto incrementing slugs for books. For my use case I am using bookstack as a public FAQ system. In our old system an FAQ had a numberic ID which was easy for a customer to reference on a phone call. For example you could tell the person to look at book 113 and they could add that to the url. ### Describe the benefits this would bring to existing BookStack users This feature may be useful for other users doing similar tasks. You also end up with shorter URLs as there is less text. ### Can the goal of this request already be achieved via other means? Currently somebody would have to manually go into the database and change slugs to numbers. Doing this can quickly cause slugs to go out of sync. It would also be much nicer to allow this to all be done in the front end. ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundemental request ### How long have you been using BookStack? 0 to 6 months ### Additional context _No response_
OVERLORD added the 🔨 Feature Request label 2026-02-05 06:34:17 +03:00
Author
Owner

@Shun-Ibiki commented on GitHub (Aug 21, 2023):

Any update for this?

@Shun-Ibiki commented on GitHub (Aug 21, 2023): Any update for this?
Author
Owner

@ssddanbrown commented on GitHub (Aug 21, 2023):

@Shun-Ibiki No

@ssddanbrown commented on GitHub (Aug 21, 2023): @Shun-Ibiki No
Author
Owner

@aliajoudanian commented on GitHub (Dec 3, 2023):

Hi, In order to resolve the issue of inaccurate and unclear slugs in Persian, Arabic, and other similar languages caused by Automatic character conversion, it would be beneficial to enable the modification of book slugs.

@aliajoudanian commented on GitHub (Dec 3, 2023): Hi, In order to resolve the issue of inaccurate and unclear slugs in Persian, Arabic, and other similar languages caused by Automatic character conversion, it would be beneficial to enable the modification of book slugs.
Author
Owner

@StefanKuh commented on GitHub (Jul 16, 2025):

Hello,

I've created a fork of BookStack that adds the ability to customize the slug for each entity (books, chapters, pages and shelves).

It's still rough around the edges but the basic functionality works. It still needs a duplicate check (I could use the SlugGenerateor:slugInUse function), and the UI is pretty bare bone.

If there is still interest in this feature, I'll be happy to clean up the edges and create a Pull Request.

@StefanKuh commented on GitHub (Jul 16, 2025): Hello, I've created a fork of [BookStack](https://github.com/StefanKuh/BookStack/tree/custom_slugs) that adds the ability to customize the slug for each entity (books, chapters, pages and shelves). It's still rough around the edges but the basic functionality works. It still needs a duplicate check (I could use the `SlugGenerateor:slugInUse` function), and the UI is pretty bare bone. If there is still interest in this feature, I'll be happy to clean up the edges and create a Pull Request.
Author
Owner

@SerGinger commented on GitHub (Jul 16, 2025):

@StefanKuh if it allows one to auto-increment with a numerical value (rather than needing to manually enter for each object), I think that's what the initial request was looking for and something I absolutely see value in.

@SerGinger commented on GitHub (Jul 16, 2025): @StefanKuh if it allows one to auto-increment with a numerical value (rather than needing to manually enter for each object), I think that's what the initial request was looking for and something I absolutely see value in.
Author
Owner

@SuperPat45 commented on GitHub (Jul 16, 2025):

If there is still interest in this feature, I'll be happy to clean up the edges and create a Pull Request.

I am VERY interested in this feature!

@SuperPat45 commented on GitHub (Jul 16, 2025): > If there is still interest in this feature, I'll be happy to clean up the edges and create a Pull Request. I am VERY interested in this feature!
Author
Owner

@ssddanbrown commented on GitHub (Jul 16, 2025):

I'm not really keen on having extra options/fields/metadata to support this, especially as needs/desires may vary (as reflected above) but I'd be open to adding a new logical theme system hook so that any custom logic could be defined/used where desired.

@ssddanbrown commented on GitHub (Jul 16, 2025): I'm not really keen on having extra options/fields/metadata to support this, especially as needs/desires may vary (as reflected above) but I'd be open to adding a new [logical theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/logical-theme-system.md) hook so that any custom logic could be defined/used where desired.
Author
Owner

@StefanKuh commented on GitHub (Jul 17, 2025):

@ssddanbrown my current solution does not need any additional fields in the database. I just added the slug to the controller validation, and if set, save it to the entity.

But you are right, in order to accommodate advanced custom logic (like an incrementing ID, or a getting the slug from an external system), a hook for the theme system would be more flexible. Maybe on_entity_save, that provides the entity and the request before the entity is saved or updated.

Theoretically, the same can be achieved by using the web_middleware_after hook. But that would require reimplementing parts of the controller and then save the entity again.

@StefanKuh commented on GitHub (Jul 17, 2025): @ssddanbrown my current solution does not need any additional fields in the database. I just added the `slug` to the controller validation, and if set, save it to the entity. But you are right, in order to accommodate advanced custom logic (like an incrementing ID, or a getting the slug from an external system), a hook for the theme system would be more flexible. Maybe `on_entity_save`, that provides the entity and the request before the entity is [saved](https://github.com/BookStackApp/BookStack/blob/c2603ba897451992e71a4079b3bb7d45e539211a/app/Entities/Repos/BaseRepo.php#L51) or [updated](https://github.com/BookStackApp/BookStack/blob/c2603ba897451992e71a4079b3bb7d45e539211a/app/Entities/Repos/BaseRepo.php#L82). Theoretically, the same can be achieved by using the `web_middleware_after` hook. But that would require reimplementing parts of the controller and then save the entity again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3385