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

Book/chapter classes similar to tag classes #5217

Open
1 task done
sws-noahdoersing opened this issue Sep 25, 2024 · 2 comments
Open
1 task done

Book/chapter classes similar to tag classes #5217

sws-noahdoersing opened this issue Sep 25, 2024 · 2 comments

Comments

@sws-noahdoersing
Copy link

Describe the feature you'd like

As mentioned on https://www.bookstackapp.com/docs/admin/hacking-bookstack/, BookStack sets classes on a page's HTML <body> element depending on which tags are assigned to that page (for a tag "Priority: Critical", the classes tag-name-priority tag-value-critical tag-pair-priority-critical are added).

This is incredibly handy for styling and could be extended to encompass book and chapter (e.g. for a book "Servers" a class like book-servers).

Describe the benefits this would bring to existing BookStack users

Assigning different styles based on book and chapter would improve customization options.

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

Not that I'm aware of (except tagging everything with book/chapter titles, which isn't practical or maintainable).

Have you searched for an existing open/closed issue?

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

How long have you been using BookStack?

3 months to 1 year

Additional context

No response

@ssddanbrown
Copy link
Member

Thanks @sws-noahdoersing,
Personally I wouldn't be too keen on using book names for this, since they're likely to change and would only serve as one potential label/class to be used, but I'd be potentially open to having tag classes reflect parent book/chapter tags, so like book-tag-pair-priority-critical, chapter-tag-pair-priority-urgent.

That way you could tag multiple different books with a tag for specific tweaks/customization for all pages within those books, and it keeps the advanced customization functionality within the scope of tags.

@sws-noahdoersing
Copy link
Author

That's a much better approach, I agree!

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