Add support for reusable variables to avoid content duplication across pages
Describe the feature you'd like
First, thank you for all the work you’ve done on BookStack, it’s a fantastic tool. That said, one feature we find missing is support for reusable variables.
These could be simple key-value pairs that could be referenced within page content using a tag-like syntax (e.g., {{app_version}}). When rendering the page, BookStack would replace these variables with their current value.
These variables could perhaps use the existing tag system, and be referenced directly within page content from the editors (WYSIWYG or Markdown).
Describe the benefits this would bring to existing BookStack users
Avoid content duplication, reduce maintenance effort, improve consistency
Can the goal of this request already be achieved via other means?
Currently, BookStack supports reusing page content, which is helpful for repeating entire sections. However, this doesn't address the use case of reusing small values like version numbers, email addresses, or paths. Maintaining an entire page just to store a value feels heavy and isn't intuitive for non-technical users.
Have you searched for an existing open/closed issue?
- [x] I have searched for existing issues and none cover my fundamental request
How long have you been using BookStack?
Over 5 years
Additional context
If variables could be linked to the tag system, that might be a good way to build on existing features.
Would this be something you would consider (even as a PR) ?
Hi @lucaguindani,
The existing page include system can include parts of text to be used inline. This is the behaviour by default for most block-level includes, with only some target block types (tables, lists) including the whole block rather than the contents.
This means you could have a central page dedicated to all bits of information. Then include the specific bits as required. You don't need a page per value.
Hey @ssddanbrown, thanks for the quick answer.
I understand, thanks for the clarification about the existing feature. I still think, being able to include tags content dynamically inside the editor would be an improvement, but if it's not something you're interested in, we'll use the include system 🙂
@lucaguindani Thanks for your understanding. There is a prior request for some level of editor integration with the include system in #5594.
Otherwise, I'll go ahead and close this off.