Book Structure Templating #1466

Closed
opened 2026-02-05 00:59:38 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @ITTurtle on GitHub (Nov 28, 2019).

Describe the feature you'd like
Page templating is great, but I would like the ability to instantly deploy a book using a template chapter structure.

Describe the benefits this feature would bring to BookStack users
Somebody must enforce a structure at the start when deploying a documentation server. Using templates solves two problems. First, it's a tool to enforce standardization, that is each book has the same structure. This lowers the time of searching documentation. The second reason to use book templates is to include there question checklist to show writers what information they should include.

I can presently do this using page templates, but that means I am not making use of the chapter level of organisation as I can only template pages.
image

Here is an example of the kind of structure I'd like to deploy with a single click.

N.B.
I've tried reverse engineering this and doing it through SQL and I can duplicate the books/chapters tables, but they don't appear as books in the web interface. I'm missing a hook somewhere.

Originally created by @ITTurtle on GitHub (Nov 28, 2019). **Describe the feature you'd like** Page templating is great, but I would like the ability to instantly deploy a book using a template chapter structure. **Describe the benefits this feature would bring to BookStack users** Somebody must enforce a structure at the start when deploying a documentation server. Using templates solves two problems. First, it's a tool to enforce standardization, that is each book has the same structure. This lowers the time of searching documentation. The second reason to use book templates is to include there question checklist to show writers what information they should include. I can presently do this using page templates, but that means I am not making use of the chapter level of organisation as I can only template pages. ![image](https://user-images.githubusercontent.com/58307382/69825719-1cc60800-1208-11ea-997b-afeaaeb3e5e4.png) Here is an example of the kind of structure I'd like to deploy with a single click. N.B. I've tried reverse engineering this and doing it through SQL and I can duplicate the books/chapters tables, but they don't appear as books in the web interface. I'm missing a hook somewhere.
OVERLORD added the :cat2:🐈 Possible duplicate label 2026-02-05 00:59:38 +03:00
Author
Owner

@loftsystems commented on GitHub (Dec 6, 2019):

I think this is a great feature request. The example is perfect.

@loftsystems commented on GitHub (Dec 6, 2019): I think this is a great feature request. The example is perfect.
Author
Owner

@ssddanbrown commented on GitHub (Dec 7, 2019):

Thank you for the request @ITTurtle.

This if functionally a duplicate of #808 and #1123 so I'm going to close this to cut down on similar issues.

I've tried reverse engineering this and doing it through SQL and I can duplicate the books/chapters tables, but they don't appear as books in the web interface. I'm missing a hook somewhere.

Yeah, It'll likely be the permission system since the per-role item-level permissions need to be updated. You can use the below command to regenerate the permissions table so you don't have to do this manually:

php artisan bookstack:regenerate-permissions

You may also want to run:

php artisan bookstack:regenerate-search

A full list of BookStack commands can be found here.

@ssddanbrown commented on GitHub (Dec 7, 2019): Thank you for the request @ITTurtle. This if functionally a duplicate of #808 and #1123 so I'm going to close this to cut down on similar issues. > I've tried reverse engineering this and doing it through SQL and I can duplicate the books/chapters tables, but they don't appear as books in the web interface. I'm missing a hook somewhere. Yeah, It'll likely be the permission system since the per-role item-level permissions need to be updated. You can use the below command to regenerate the permissions table so you don't have to do this manually: ```bash php artisan bookstack:regenerate-permissions ``` You may also want to run: ```bash php artisan bookstack:regenerate-search ``` A full list of BookStack [commands can be found here](https://www.bookstackapp.com/docs/admin/commands/).
Author
Owner

@argonavist commented on GitHub (Jan 18, 2026):

This functionality can be achieved by exporting and re-importing a book. It will create a duplicate book with the same content, so you just need to maintain one "template" book.

@argonavist commented on GitHub (Jan 18, 2026): This functionality can be achieved by exporting and re-importing a book. It will create a duplicate book with the same content, so you just need to maintain one "template" book.
Author
Owner

@ssddanbrown commented on GitHub (Jan 18, 2026):

@argonavist You can also just copy books and chapters, which was introduced at the end of 2021: https://www.bookstackapp.com/blog/bookstack-release-v21-12/#copy-entire-chapters--books

@ssddanbrown commented on GitHub (Jan 18, 2026): @argonavist You can also just copy books and chapters, which was introduced at the end of 2021: https://www.bookstackapp.com/blog/bookstack-release-v21-12/#copy-entire-chapters--books
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1466