When blogging, you usually publish loose thoughts. Generally, ideas, that just came to mind and seemed interesting enough to write about at that time.
Blogging is great in the sense, that you do not need to worry a lot about structuring your content. You can simply produce stand-alone articles, that are not expected to be part of a bigger context.
After running a blog for some time and adding content to it, you might notice two things:
- Certain posts are more popular than others
- As individual posts emerged as being popular, you tried to produce more articles of the same kind.
In other words, eventually, your blog piles up a lot of content on a certain topic, but due to the unstructured nature of blogs, that content is far-flung. A visitor might be attracted by a certain article, but might also miss other articles, of equal relevance. At that point, it may be worthwhile to extract the accumulated knowledge from the blog and distill it into a book.
Compiling a book from loose blog posts has a number of advantages:
- You can recycle ideas (especially of course, those of the more popular blog posts).
- On the average, books produce more impressions per visitors than individual blog posts (which is important when monetizing through advertisement).
- Books are a lot harder to rip off by scrapper software, since book pages are not standalone articles.
- Larger bodies of content are more likely to attract backlinks than smaller ones.
So far so good. There is however one problem, though. You would not want visitors to be able to read a book while you are drafting it. You could of course be very careful about not leaking URLs and using robots.txt to disallow access to /book, but that is a weak protection and may easily fail. Drupal's build in drafting function, setting nodes to "not published" won't help either, since unpublished nodes are not allowed to have children.
This calls for using one of the node access restriction modules. The question is just, which one does the job best? With books usually containing lot's of pages before being ready to be published, it's sensible to pick a module, that allows for removing access restriction all at once without requiring each node to be updated individually.
So, how do you protect Drupal books, while drafting? First install the two modules Organic groups and Organic group inheritence. Configure the og module under /admin/og/og. Assign at least the book content type to be usable by groups (make it a standard group entry). Configure the book inheritance module under admin/og/og-book-inheritance. Enable inheritance and make pages inherit from the top level node.
When beginning to draft a new book, start by first creating a new, secret group (node/add/group). Create the top level book page like usual, but additionally also assign it to the new group. You'll find, that now the book can only be accessed, when you are logged into Drupal as the group owner. Once the book is ready to be published, simply delete the group itself and choose to do nothing with the nodes it protects. The entire book will then simply fall into it's place for everyone to see.
To draft a new chapter, start the same way, you'd start drafting a new book. That is, make the new chapter in fact a new book, protected by a group of it's own. Once it is ready to be published, delete the group and simply use Drupal's book outline feature to merge the chapter into it's final destination.
