PHPackages                             carlalexander/book-project-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. carlalexander/book-project-template

ActiveProject

carlalexander/book-project-template
===================================

Template project for publishing a book in markdown

2287[1 PRs](https://github.com/carlalexander/book-project-template/pulls)PHP

Since Jun 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/carlalexander/book-project-template)[ Packagist](https://packagist.org/packages/carlalexander/book-project-template)[ RSS](/packages/carlalexander-book-project-template/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Template project for publishing a book in markdown
==================================================

[](#template-project-for-publishing-a-book-in-markdown)

This is a template project based on the code used to create the PDF and epub version of *[Discover object-oriented programming using WordPress](https://carlalexander.ca/book)*. For more a more detailed writeup of how the code works, please read the companion article [here](https://carlalexander.ca/write-book-markdown/). You can also leave your questions there.

*Note: This code is available as a base for your own book project. I'm no longer doing any development on it.*

Requirements
------------

[](#requirements)

This is a [Symfony LTS](https://symfony.com/) application so you need to have PHP (minimum version 7.1.3) as well as [composer](https://getcomposer.org/) installed. Besides that, the application also needs [prince](https://www.princexml.com/) (for PDF generation) and [pandoc](https://pandoc.org/) (for epub generation) installed.

You can install these two tools using [homebrew](https://brew.sh/) on MacOS:

```
$ brew cask install --no-quarantine prince
$ brew install pandoc
```

Installation
------------

[](#installation)

Once the prerequisites installed, you can create a new project using the following command:

```
$ composer create-project carlalexander/book-project-template
```

Usage
-----

[](#usage)

A sample preface + 4 section book layout is available in the `content` directory. The HTML template used for the book (including the cover) can be found in `book.html.twig`. To edit the style of the book, edit the CSS files found in the `assets/css` folder.

There are two builds commands available to create your book. One for PDF and one for EPUB. These are:

```
$ bin/console book:build-pdf
$ bin/console book:build-mobile
```

Please refer to this [article](https://carlalexander.ca/write-book-markdown/) for a detailed explanation of the code and how to modify it to write your own book.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9dc50dba9cc5e4bf097f44026034daa66e2ed552549ba363304ff22914f4c0d1?d=identicon)[carlalexander](/maintainers/carlalexander)

---

Top Contributors

[![maximejobin](https://avatars.githubusercontent.com/u/1080760?v=4)](https://github.com/maximejobin "maximejobin (2 commits)")[![carlalexander](https://avatars.githubusercontent.com/u/654684?v=4)](https://github.com/carlalexander "carlalexander (1 commits)")

### Embed Badge

![Health badge](/badges/carlalexander-book-project-template/health.svg)

```
[![Health](https://phpackages.com/badges/carlalexander-book-project-template/health.svg)](https://phpackages.com/packages/carlalexander-book-project-template)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
