2 categories = ["Releases"]
4 title = "BookStack Release v21.12"
5 date = 2021-12-22T16:45:00Z
7 image = "/images/blog-cover-images/reindeer-joe-green.jpg"
8 slug = "bookstack-release-v21-12"
12 As our last feature release of the year BookStack v21.12 is now available.
13 Upon a bunch of fixes & improvements, this release features outgoing webhooks in
14 addition to the ability of copying entire chapters and books.
16 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
17 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v21.12)
22 - **Security Releases** - There were a couple of security vulnerabilities found during the life of
23 v21.11. See the [v21.11.2](/blog/bookstack-release-v21-11-2/) and [v21.11.3](/blog/bookstack-release-v21-11-3/) posts for more details.
28 BookStack can now send out webhooks! These are web requests that are emitted by BookStack
29 when someone performs an action in the system (Updates page, Creates book etc..).
30 Webhooks can be created by an administrator in the application "Settings > Webhooks" view.
32 
34 Webhooks can be triggered by any event that's tracked in the audit log. You can choose
35 specific events to trigger your webhooks or you can trigger upon any available system event.
37 
39 When triggered, BookStack will send a HTTP POST JSON request to the provided endpoint
40 with a common set of details regarding the event. The general data format is shown when creating
41 or editing a webhook, but the below is an example of a `page_update` event:
45 "event": "page_update",
46 "text": "Benny updated page \"My wonderful updated page\"",
47 "triggered_at": "2021-12-11T22:25:10.000000Z",
53 "triggered_by_profile_url": "https://bookstack.local/user/benny",
55 "webhook_name": "My page update webhook",
56 "url": "https://bookstack.local/books/my-awesome-book/page/my-wonderful-updated-page",
61 "name": "My wonderful updated page",
62 "slug": "my-wonderful-updated-page",
64 "created_at": "2021-12-11T21:53:24.000000Z",
65 "updated_at": "2021-12-11T22:25:10.000000Z",
76 Webhooks have a `text` property (Populated where possible, depending on event) which allows them to
77 be used directly in slack or slack-compatible services. If you wanted to get more advanced
78 you could build your own middleware or use a service like [Zapier](https://zapier.com/) or [n8n](https://n8n.io/)
79 to glue actions & services together. Some possibilities could be:
81 - Email an admin when application settings are changed.
82 - Post in slack when a book is deleted.
83 - Log page change occurrences to a Google doc.
84 - Update a BookStack page via the REST API when new users register.
86 Since webhooks need to make external HTTP requests, they have potential to slow down a system.
87 If you're creating a large amount of webhooks, that'd be triggered frequently, we have a way to run these in the background to
88 prevent user experience slowdowns; [Details can be found here](/docs/admin/email-webhooks/#async-action-handling).
90 ### Copy Entire Chapters & Books
92 It's been possible to copy a page for a while now. With v21.12 it's now possible to
93 copy entire chapters or even books. Performing this action will also copy all child chapters
94 and/or pages in a single smooth action. Copy views will now show warnings to confirm
95 copy behavior within BookStack so the necessary considerations can be made.
97 
99 These new abilities bring some great potential new workflow advancements such as being
100 able to create "templated" books, pre-configured with the right chapter & page structure,
101 ready to be copied out.
105 When creating or updating a role there can be a lot of permissions to configure.
106 Creating a set of similar roles could be a time consuming experience.
107 As of v21.12 there's now a "Copy" action when viewing an existing role which
108 will take you to the role create view with all fields filled as per the copied role.
110 
112 ### Audit Log IP Address Search
114 The audit log has received another update thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/3081).
115 It's now possible to search the audit log by IP address.
116 The search is a prefix-match so you can filter using just the starting
117 portion if needing to match an IP range.
119 
121 ### Search API Updates
123 In v21.11 we added the new search API endpoint. Within v21.11.3 a few extra useful properties
124 were added to item response data:
129 "url": "https://example.com/books/my-book/page/how-advanced-are-cats",
131 "name": "How advanced are <strong>cats</strong>?",
132 "content": "<strong>cats</strong> are some of the most advanced animals in the world."
138 These additions save you from needing to do extra work to formulate the full
139 item URL or preview content.
141 ### Logical Theme System Custom Commands
143 The [logical theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/logical-theme-system.md)
144 has been updated to allow registration of custom commands. These are actions you'd typically
145 run on command line via `php artisan bookstack:<command>`.
147 I recently produced a getting started guide for the local theme system which includes
148 registering custom commands:
150 <iframe width="100%" height="360" src="https://www.youtube.com/embed/YVbpm_35crQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
155 As always our awesome translators have been doing their work to keep language
156 content up-to-date. The below are the great contributions since v21.11:
158 - Vitaliy (gviabcua) - *Ukrainian*
159 - Marco (cdrfun) - *German; German Informal*
160 - mannycarreiro - *Portuguese*
162 - na3shkw - *Japanese*
163 - marinkaberg - *Russian*
164 - 10935336 - *Chinese Simplified*
165 - Luís Tiago Favas (starkyller) - *Portuguese*
166 - Leonardo Mario Martinez (leonardo.m.martinez) - *Spanish, Argentina*
167 - nutsflag - *French*
168 - Thiago Rafael Pereira de Carvalho (thiago.rafael) - *Portuguese, Brazilian*
169 - scureza - *Italian*
170 - Ken Roger Bolgnes (kenbo124) - *Norwegian Bokmal*
171 - Nguyen Hung Phuong (hnwolf) - *Vietnamese*
172 - Indrek Haav (IndrekHaav) - *Estonian*
173 - Umut ERGENE (umutergene67) - *Turkish*
176 ### Full List of Changes
178 **Released in v21.12**
180 * Added webhooks. ([#147](https://github.com/BookStackApp/BookStack/pull/147), [#3099](https://github.com/BookStackApp/BookStack/pull/3099))
181 * Added ability to copy books, chapters & roles. ([#3118](https://github.com/BookStackApp/BookStack/pull/3118), [#1123](https://github.com/BookStackApp/BookStack/issues/1123))
182 * Added audit log IP address search. Thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/3081). ([#3081](https://github.com/BookStackApp/BookStack/pull/3081))
183 * Updated translations with latest Crowdin changes. ([#3117](https://github.com/BookStackApp/BookStack/pull/3117))
184 * Fixed issue where non-ascii content could break search result previews. Thanks to [@Kristian-Krastev](https://github.com/BookStackApp/BookStack/pull/3113). ([#3113](https://github.com/BookStackApp/BookStack/pull/3113))
185 * Fixed mismatched password validation rules across the application. ([#2237](https://github.com/BookStackApp/BookStack/issues/2237))
187 **Released in v21.11.1 through v21.11.3**
189 * Added custom command support to the logical theme system. ([#3072](https://github.com/BookStackApp/BookStack/pull/3072))
190 * Added support for `prefers-contrast` media setting to increase contrast in faded areas when active. ([#2634](https://github.com/BookStackApp/BookStack/issues/2634))
191 * Updated user search to help prevent discovery and harvesting of user information. Thanks @haxatron for reporting. ([#3108](https://github.com/BookStackApp/BookStack/issues/3108))
192 * Updated search API results to include the highlighted preview content. ([#3096](https://github.com/BookStackApp/BookStack/issues/3096))
193 * Updated search API results to include item URL. ([#3080](https://github.com/BookStackApp/BookStack/issues/3080))
194 * Updated translations with latest Crowdin changes. ([#3093](https://github.com/BookStackApp/BookStack/pull/3093), [#3076](https://github.com/BookStackApp/BookStack/pull/3076), [#3057](https://github.com/BookStackApp/BookStack/pull/3057))
195 * Updated TOTP confirmation view to autofocus on code input. Thanks to [@raccettura](https://github.com/BookStackApp/BookStack/pull/3068). ([#3068](https://github.com/BookStackApp/BookStack/pull/3068))
196 * Updated any links on homepage lists to be more obvious & accessible. ([#3046](https://github.com/BookStackApp/BookStack/issues/3046))
197 * Fixed issue with greater-than-expected visibility on page-draft-related items. Thanks @haxatron for reporting. ([#3086](https://github.com/BookStackApp/BookStack/issues/3086))
198 * Fixed issue where public API access was not limited by system public control in certain conditions. ([#3091](https://github.com/BookStackApp/BookStack/issues/3091))
199 * Fixed faulty page navigation links when headers are nested within other content. Thanks to [@Julesdevops](https://github.com/BookStackApp/BookStack/pull/3069). ([#3069](https://github.com/BookStackApp/BookStack/pull/3069), [#3058](https://github.com/BookStackApp/BookStack/issues/3058))
203 Focus going into next year will be on the editor. I've started assessing new options but found it difficult to harness
204 the time needed this year, so it will be my priority going into 2022.
206 I have continued to produce more videos on the [BookStack YouTube channel](https://www.youtube.com/channel/UCH66RFWfw6CSm2T1EM4ik1g).
207 I'll look to continue this when wanting to get away from code-level work for a bit.
211 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://unsplash.com/@jg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Joe Green</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span></span>