Beschreibung
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.
FAQ
-
How do I configure BookStack and the plugin?
-
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. -
Will my website go down if BookStack goes down?
-
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. -
I changed something in BookStack while my site was offline. Why is my changed content not displayed?
-
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). -
How are images handled?
-
The plugin now only caches the pure markup content of BookStack. Images are loaded directly from BookStack by the client browser.
-
How do the shortcodes work?
-
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 linkFor 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. -
How do I style BookStack content?
-
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 -
How about displaying a chapter or an entire book?
-
You can add the parameter
book
(orchapter
) to the shortcode. This will add a table of contents at the top. -
How are internal BookStack links handled?
-
Links to pages, chapters or books will be rewritten so that they can be viewed within WordPress. All other links, like attachments, remain unchanged.
-
I want to test many BookStack entries without creating so many WordPress pages
-
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 -
Any other questions?
-
The plugin website may have more answers for you, or you can email martin@bastionbytes.de.
Rezensionen
There are no reviews for this plugin.
Mitwirkende & Entwickler
„BastionBytes integration for BookStack“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:
MitwirkendeÜbersetze „BastionBytes integration for BookStack“ in deine Sprache.
Interessiert an der Entwicklung?
Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.
Änderungsprotokoll
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