BastionBytes integration for BookStack
A BookStack (https://www.bookstackapp.com/) integration plugin to display BookStack sites via shortcode.
Plugin info
Maintenance & Compatibility
Maintenance score
Actively maintained • Last updated 79 days ago
Is BastionBytes integration for BookStack abandoned?
Likely maintained (last update 79 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
The intention of this plugin is to let non-technical users edit parts of your WordPress page in BookStack.
Changes in BookStack will be displayed on your website.
When a BookStack user changes content on a BookStack site a REST request is sent to https://yoursite/wp-json/bookstack/v1/site-update to
Wordpress that the site has changed. The next time a WordPress page containing a shortcode to the previously changed BookStack site is requested,
the plugin will make a request to BookStack to fetch the new content. In normal operation the content is cached.
Installation
Frequently Asked Questions
To grant API access to the plugin, you should create a special API user in BookStack. The API user will need the role ‘API’ and an ‘API Token’.
When creating the token you will need to specify the ‘Token ID’ and ‘Token Secret’ values in the plugin settings.
To get instant updates of your content from BookStack, you need to add a webhook in ‘Settings’->’Webhooks’. The ‘Webhook Endpoint’ value
is displayed on the plugin settings page under ‘BookStack Webhook URL’. The webhook must be enabled and fire on the following events:
- page_create
- page_update
- page_delete
- page_move
- chapter_create
- chapter_update
- chapter_delete
- chapter_move
- book_update
- book_delete
- book_sort
A reasonable value for the ‘Webhook Request Timeout (in Seconds)’ might be ‘2’. Creating a webhook is not strictly necessary,
but allows instant updates of content changes.
In normal mode (which is highly recommended and the default), the BookStack content is cached in WordPress. Even if the cached data is
is marked as invalid, it will be served as long as Bookstack is offline.
If you make changes in BookStack while WordPress is down, WordPress won’t notice the changes. The changes will be automatically reloaded
when the cached content is automatically invalidated after the cache timeout (in hours) (default 24 hours).
The plugin now only caches the pure markup content of BookStack. Images are loaded directly from BookStack by the client browser.
An example is
[bb-bookstack id=17 show_title show_date]
This would show the BookStack page with the ID 17. Getting the ID from BookStack is a bit tricky:
1. Open the page
2. Select any text
3. The ID can be extracted from the displayed link
For example the link https://mybookstack/link/8#bkmrk-something-here has the ID 8.
The ‘show_title’ attribute means that the title of the BookStack page is always displayed. If the ‘hide_title’ attribute is given, the title is suppressed.
If neither ‘show_title’ nor ‘hide_title’ is given, the default setting selected in the plugin settings will be used.
The ‘show_date’ attribute means that the last change date of the BookStack page is always displayed. If the ‘hide_date’ attribute is given, the date is suppressed.
If neither ‘show_date’ nor ‘hide_date’ is given, the default setting selected in the plugin settings will be used.
The content is surrounded by the tag <div class="bb-bookstack-content">, the title (if enabled) by <div class="bb-bookstack-title"> and the last change date
(if enabled) by <div class="bb-bookstack-last-changed">. So it’s easy to style BookStack content with CSS.
Style classed used for table of contents:
* bb-bookstack-book
* bb-bookstack-book-label
* bb-bookstack-chapter
* bb-bookstack-chapter-label
* bb-bookstack-page
You can add the parameter book (or chapter) to the shortcode. This will add a table of contents at the top.
Links to pages, chapters or books will be rewritten so that they can be viewed within WordPress. All other links, like attachments, remain unchanged.
The ‘id’ parameter in the shortcode can be omitted. In this case, the ID must be passed as a parameter (bb-bookstack-id) in the URL.
E.g. https://mywordpress.example.org/?bb-bookstack-id=9
The plugin website may have more answers for you, or you can email [email protected].
Review feed
Screenshots
Changelog
0.4.12
- tested with wp 6.9
0.4.11
- fixed truncated cache content on very long BookStack pages (>64k)
0.4.10
- force empty cache on update of db schema to version 2
0.4.9
- fixed display of wrong webhook URL under certain circumstances
- fixed db update bug
0.4.8
- ability to view specific post errors
0.4.7
- fixed bug on rewriting internal BookStack links
0.4.6
- fixed bookstack style issue with narrow text next to floating images
- added support for shortcode parameters book and chapter to display table of content and allow navigation to sibling pages
- added support for rewriting internal bookstack links
- fixed issue on plugin upgrade
0.4.5
- added styles of some bookstack classes
- show last change date from bookstack
- allow to pass bookstack id via url
0.4.4
- Renamed plugin to “BastionBytes integration for BookStack”
- Added support for optional ignoring a negative ssl check of the BookStack installation certificate
0.4.3
- Fixed bug: Missing explicitly no permissions for rest route (not citical)
0.4.2
- The first published version