Abstract page title length into variable #1378

Closed
opened 2026-02-05 00:44:17 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @james-geiger on GitHub (Sep 25, 2019).

Describe the feature you'd like
Be able to set an app-specific limit to the page title in the .env file to prevent truncated page titles.

Currently, the value is hard coded as 25. I'd like to be able to set this to be longer or turned off, similar to the page revision limit.

Describe the benefits this feature would bring to BookStack users
Would increase the SEO value and descriptiveness of page titles and allow users to further customize their BookStack instances.

Additional context
I have this working on my local development instance, but would need more context to the getShortTitle function and what other functions call it that such a change might break.

I've already noticed the breadcrumbs would need to be fixed to avoid breaking the UI.

Originally created by @james-geiger on GitHub (Sep 25, 2019). **Describe the feature you'd like** Be able to set an app-specific limit to the page title in the .env file to prevent truncated page titles. Currently, the value is hard coded as 25. I'd like to be able to set this to be longer or turned off, similar to the page revision limit. **Describe the benefits this feature would bring to BookStack users** Would increase the SEO value and descriptiveness of page titles and allow users to further customize their BookStack instances. **Additional context** I have this working on my local development instance, but would need more context to the getShortTitle function and what other functions call it that such a change might break. I've already noticed the breadcrumbs would need to be fixed to avoid breaking the UI.
OVERLORD added the 🛠️ Enhancement🖌️ View Customization labels 2026-02-05 00:44:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 9, 2019):

Thanks for the suggestion @james-geiger.

I'd rather not have an additional option/control for this but instead improve on how titles are done overall. Titles are currently set in the controller which is limiting, It would probably be better for them to be set in the top-level views (Passing the current book/chapter/page/shelf) and then handled within it's own view. That way people could override the logic using the theme system and do what they want. Just got to figure the cleanest way to go about it with blade.

@ssddanbrown commented on GitHub (Oct 9, 2019): Thanks for the suggestion @james-geiger. I'd rather not have an additional option/control for this but instead improve on how titles are done overall. Titles are currently set in the controller which is limiting, It would probably be better for them to be set in the top-level views (Passing the current book/chapter/page/shelf) and then handled within it's own view. That way people could override the logic using the theme system and do what they want. Just got to figure the cleanest way to go about it with blade.
Author
Owner

@james-geiger commented on GitHub (Oct 10, 2019):

@ssddanbrown I can see the value in having this be separated into a view. To clarify, are you talking the Laravel theme system using Blade, or a BookStack-specific theme system?

@james-geiger commented on GitHub (Oct 10, 2019): @ssddanbrown I can see the value in having this be separated into a view. To clarify, are you talking the Laravel theme system using Blade, or a BookStack-specific theme system?
Author
Owner

@ssddanbrown commented on GitHub (Oct 12, 2019):

@james-geiger Both, kind of. Details of the system can be found in #652 but it's essentially a little configuration on the BookStack side that configures blade to look at a custom directory first, so view files can be overridden on a per-file basis, without editing the core BookStack files.

@ssddanbrown commented on GitHub (Oct 12, 2019): @james-geiger Both, kind of. Details of the system can be found in #652 but it's essentially a little configuration on the BookStack side that configures blade to look at a custom directory first, so view files can be overridden on a per-file basis, without editing the core BookStack files.
Author
Owner

@ssddanbrown commented on GitHub (Sep 10, 2025):

I'm going to go ahead and close this off since this has had little other desire, and since there may be possibilities via the customization system.

TBH, I can't remember where this applied to, but I may be able to review specific locations or customization options depending on location where needed.

@ssddanbrown commented on GitHub (Sep 10, 2025): I'm going to go ahead and close this off since this has had little other desire, and since there may be possibilities via the customization system. TBH, I can't remember where this applied to, but I may be able to review specific locations or customization options depending on location where needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1378