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

Title and Header Customization in BookStack #5326

Closed
2 tasks done
Ainz opened this issue Nov 17, 2024 · 2 comments
Closed
2 tasks done

Title and Header Customization in BookStack #5326

Ainz opened this issue Nov 17, 2024 · 2 comments

Comments

@Ainz
Copy link

Ainz commented Nov 17, 2024

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

The initial goal was to implement a structured text header with a specific title format: “HOMEWORLD.NET - CODEX of the UNBOUND.” This also required a meta title to display in the browser tab without causing duplication in the header. The process involved CSS styling, changes in the settings, and direct edits to theme and app Blade files.

https://homeworldlore.net

CSS Customization and Title Duplication
I first tried styling the header using CSS, aiming to split the title into two lines with sub-items. This approach worked visually, but I observed an absence of a distinct meta title setting. When the title was added through the App Name field in BookStack’s settings, it populated the browser tab title but also appeared visibly in the header, causing unwanted duplication. Tried toggling the App Name filed in different ways and with different symbols, like   which should not be visible, but it was.

Blade File Edits: Theme and Default Application Files
To control the title directly, we modified Blade template files in both the active theme directory and the default application directory:

Theme Blade Edits: Changes to base.blade.php and plain.blade.php within the active theme directory (themes/YourTheme/views/layouts/) had no effect, indicating they were likely overridden or inactive, despite a relevant Them setting in .env.

Default Blade Edits: Direct modifications to base.blade.php and plain.blade.php in the app’s root directory (resources/views/layout/) were also ineffective for displaying the title.

To verify which Blade file was active, we inserted an <h1> test header in base.blade.php within the app’s root directory, which did appear as expected. This confirmed that changes to the root base.blade.php file were recognized, while those in the theme directory were not.

image

Exact BookStack Version

24.10.2

Log Content

There seem to be no errors logged relating to this matter

Hosting Environment

Server OS: Ubuntu 24.04 LTS
Web server: Apache2 2.4.58
PHP 8.3.6
MySQL: 8.0.40

@ssddanbrown
Copy link
Member

Changes to base.blade.php and plain.blade.php within the active theme directory (themes/YourTheme/views/layouts/) had no effect

Hi @Ainz, That would be the wrong expected directory. The overriden files would be expected to be found in themes/YourTheme/layouts/ (so no views folder involved when using the visual theme system).

@Ainz
Copy link
Author

Ainz commented Nov 17, 2024

You mention that in your vid explaining the theme system, but still do not explain why I do not see the title when editing the default files.

... what.. and suddenly it works... nuts

image

@Ainz Ainz closed this as completed Nov 18, 2024
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