Skip to main content
All CollectionsAuthor HelpMarkdown and Markua
How to Create and Publish a Sample Book
How to Create and Publish a Sample Book

Keywords: book, ebook, sample, sample book, how

Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

Publishing a sample book is a great way to encourage readers to buy your book.

It lets people download a subset of your book, selected by you, to let them know what your book is like.

When it's published, the sample book will appear for viewing on your book's landing page, like this:

By clicking "Read Free Sample", readers will be able to view the sample book in the available formats:

The Two Different Ways to Publish a Sample Book

There are two ways to publish a sample book:

1) Using our Upload writing mode

2) Using one of our own book generation writing modes (Browser, GitHub, or Dropbox)

We will set out the instructions for these two ways to publish a sample book in the sections below.

Uploading a Sample Book in the Upload Writing Mode

If you've already published a book in our Upload writing mode, you'll be familiar with the box where you can upload your sample book files:

If your book is already published, all you need to do is upload your sample book files there, and they'll be published automatically!

And if you're book has not been published yet, when you do ahead and publish it for the first time, the sample book file or files you upload will be available on your book's landing page.

Publishing a Sample Book in Browser, GitHub, or Dropbox Writing Mode

To publish a subset of your chapters in the sample book, you need to select the chapters in the manuscript, and mark them as sample content.

All your chapter titles will appear in the sample book, but only chapters you choose to include in the sample book will have the chapter contents appear in the sample book.

Selecting Chapters to Include in the Sample Book

Here is an example of a book with three chapters, in our Browser writing mode:

To include the first chapter in the sample, you write the {sample: true} directive on the line above the chapter heading, like this:

Now, when you generate a preview, you will see that there are sample book file links for you to view:

In the sample book, the Table of Contents will look the same as it does in the full book, so people get a sense of the whole book:

If we go to Chapter One, we'll see that its contents are included in the sample book:

However, Chapter Two and Chapter Three will include the chapter title, but not the chapter contents.

Instead of the chapter contents, readers will see a little message explaining that the content is not available in the sample book, with a link to the book landing page, in case they found this sample book somewhere else on the web, for example on your own personal or business website:

Publish Your Book to Get the Sample to Appear on the Book's Landing Page

You will need to publish a new version of your book (or publish it for the first time) to get your book sample to appear on the landing page.

Once the publish process is complete, people will see the link to download the sample book, if they go to your book landing page:

Note: We used OpenAI services to create some of the content in this article, including the cover image and the example text.


If you have any feedback or questions about this article, please email the Leanpub team about it at hello@leanpub.com!

If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!

Are you interested in self-publishing, and creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book

Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!

To learn about amazing new books and authors, subscribe to our YouTube channel here: https://www.youtube.com/leanpub.

You can also follow Leanpub in lots of other places!

Did this answer your question?