A long-lived project that still receives updates
WriteBook style books for your static website
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

>= 1.2.0, < 2.0
 Project Readme

Bridgetown Writebook

A Bridgetown plugin to add WriteBook style books to your static website.

Installation

Run this command to add this plugin to your site's Gemfile:

bundle add bridgetown_writebook

Usage

After installation, the plugin provides a complete book management system for your Bridgetown site. Books are organized as collections, with each book containing multiple chapters.

Creating Your First Book

  1. Set up the books infrastructure (one-time setup):

    bridgetown book setup

    This creates the necessary folder structure and adds the books collection to your Bridgetown configuration.

  2. Create a new book:

    bridgetown book new --title "My Awesome Book"

    This creates a folder under src/_books/ with an initial metadata file.

  3. Add chapters to your book:

    bridgetown book chapters add --book "My Awesome Book" --title "Introduction"

    Chapters are automatically numbered and added to your book's folder.

Book Structure

Each book consists of:

  • A metadata file (00-meta.md) containing title, subtitle, and authors
  • Numbered chapter files (e.g., 01-introduction.md, 02-getting-started.md)
  • An optional cover image (cover.png in the book's folder)

Accessing Your Books

The plugin automatically generates:

  • A books index page at /books/ listing all your books
  • Individual book pages at /books/[book-slug]/ showing chapters
  • Chapter pages with navigation between previous/next chapters