Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract page title length into variable #1682

Open
james-geiger opened this issue Sep 25, 2019 · 3 comments
Open

Abstract page title length into variable #1682

james-geiger opened this issue Sep 25, 2019 · 3 comments

Comments

@james-geiger
Copy link
Contributor

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.

@ssddanbrown
Copy link
Member

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.

@james-geiger
Copy link
Contributor Author

@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?

@ssddanbrown
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants