I’ve published several books online over the years and the biggest hit was the series of Maven books that Sonatype published. Those books were originally published as an O’Reilly title, Maven: The Definitive Guide. This book had been developed out in the open on the internet as a free HTML title, and when it was published in late 2008, I did all I could to support sales of the printed title even though the book was freely available online.
If you use Maven it is likely, at some point, that you interacted with this book. It’s a comprehensive book on Maven, I wrote it as something of a missing manual on the tool because, at the time, the Maven project’s web site was just an awful mess. More important than the book being designed to make up for the Maven project’s lack of writing ability, I wrote and published the book online in such a way as to…
1. …Attract and Satisfy the Googlebot
Anyone who focuses on web content learns this lesson sooner or later, you are not writing material for a reader as much as you are writing for Google’s search index. If you look at the analytics profile of an open source project, you’ll see that Google is likely your number one source of traffic. (Maybe, maybe not, if your book is essential and widely bookmarked, you might see more direct traffic refers than Google refers, but that’s another discussion. At least during the first few years, Google should drive traffic.)
Ok, great, how do you do this? First, chunk it up. Google users like addressable content, content that answer questions quickly, and content that Stack Overflow users are going to reference directly. ”Oh, you are looking for instructions for configuring Maven dependencies, go here…” Back to that Maven book, that book had about 18 chapters to begin with and I had published 18 pages on the web. Traffic was OK, but when I decided to chunk that docbook up into 150 section level HTML pages, both Google search traffic, unique visitors, and pageview skyrocketed. Instead of having to index terms for an entire 40 page chapter, Google (and users) were presented with smaller, more focused pages which were more likely to answer a specific question.
Second, focus on utility. Write your sections to answer a frequently Googled question. (Most good developers actually don’t know much at all beyond a familiarity with how to find answers from Google, it’s true.) If you write your book to answer common questions like, “How do I install vert.x?” If you put this text into the book and make sure that you provide a web page that gives the most comprehensive answer… quality and focus is the best SEO money can buy.
2. …Publish a protected PDF
If you are an open source project, forget this. Just publish a PDF version and be done with it (or, better yet, just let O’Reilly print it and don’t open up the can of worms that is print formatting.) If you are doing this as a company to drive interest in training, offer a PDF behind a lead form. I know, I know, people hate this, but I also know that this is a great way to get people to sign-up for a mailing list. If you are writing an essential book, your users will quickly tired of having to click through section-chunked HTML, and they will eagerly trade contact information for a PDF download.
A few months after the first edition print, I decided to take the initiative and publish a PDF version of the book on the site and put that version of the book behind a lead form.
3. …Celebrate this old-fashioned thing called a “Book” (even though it is online)
If you are a software company or an open source project, your biggest days and weeks are release weeks. If your book covers software, announce updates to the book whenever you release the software. If you update the book in response to a user’s question, write a blog about it. If a third-party contributor shows up and starts contributing, make a big deal about it.
It’s seems odd and self-referential to write about the writing process, but the idea here is to add ceremony around the book as an artifact. The secret here is to increase the perceived value of online documentation by dressing it up as a book. You could position this as a collection of online documentation, or you could call it a free, online book. Part of increasing the impact of a free, online programming book is to remind people of this ancient, old-fashioned object called a book.