Hacks & Customizations
These hacks are unsupported customizations meant as unofficial workarounds.
They can cause instability, introduce issues and may conflict with future updates. Apply at your own risk!

Force Page Content Links to Open in New Tabs

  • Author: @ssddanbrown
  • Created: 27th Jan 2023
  • Updated: 27th Jan 2023
  • Last Tested On: v22.11.1

This hack will force HTML links, within the main content body of a page, to open in a new tab.

Considerations

This works via JavaScript, so is not assured to run since a user could have JavaScript disabled although this is relatively rare.

Code

head.html
1
2
3
4
5
6
<script type="module">
    const links = document.querySelectorAll('.page-content a');
    for (const link of links) {
        link.target = '_blank';
    }
</script>

Request an Update

Hack not working on the latest version of BookStack?
You can request this hack to be updated & tested for a small one-time fee.
This helps keeps these hacks updated & maintained in a sustainable manner.


Latest Hacks