PHPackages                             tobiju/bookdown-bootswatch-templates - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tobiju/bookdown-bootswatch-templates

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

tobiju/bookdown-bootswatch-templates
====================================

Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting

1.1.1(9y ago)1619.6k—10%6[3 issues](https://github.com/tobiju/bookdown-bootswatch-templates/issues)1BSD-3-ClausePHP

Since Nov 21Pushed 8y ago4 watchersCompare

[ Source](https://github.com/tobiju/bookdown-bootswatch-templates)[ Packagist](https://packagist.org/packages/tobiju/bookdown-bootswatch-templates)[ Docs](https://github.com/tobiju/bookdown-bootswatch-templates)[ RSS](/packages/tobiju-bookdown-bootswatch-templates/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (11)Used By (1)

Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
================================================================

[](#bookdownio-with-bootswatch-styles-and-prism-syntax-highlighting)

If you generate your documentation with [bookdown](http://bookdown.io/) and want some nice styles and syntax highlighting for your code blocks, then this package come to the rescue :).

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

[](#installation)

Installation of this library uses Composer. For Composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

Put the following into your `composer.json` or run `composer require tobiju/bookdown-bootswatch-templates`.

```
{
    "require-dev": {
        "tobiju/bookdown-bootswatch-templates": "^1.1.0"
    }
}

```

Put the following into your `bookdown.json`

```
{
    ...
    "template": "../vendor/tobiju/bookdown-bootswatch-templates/templates/main.php"
}

```

Styles
------

[](#styles)

Choose your preferred style by setting the `CSS_BOOTSWATCH` and `CSS_PRISM` environment variable before generating the book. The default Bootswatch style is `cerulean` and for Prism `ghcolors`. See the example below how to use another style.

Visit [bootswatch.com](https://bootswatch.com/) to see how the style looks like.

- cerulean
- cosmo
- cyborg
- darkly
- flatly
- journal
- lumen
- paper
- readable
- sandstone
- simplex
- slate
- spacelab
- superhero
- united
- yeti

Visit [prismjs.com](http://prismjs.com/) / [prism-styles](https://github.com/PrismJS/prism-themes) to see how the Prism style looks like.

- prism
- dark
- funky
- okaidia
- twilight
- coy
- atom-dark
- base16-ateliersulphurpool.light
- cb
- ghcolors
- hopscotch
- pojoaque
- xonokai

Top menu logo
-------------

[](#top-menu-logo)

To add an individual logo instead of displaying *Home* you can set the environment variable `MENU_LOGO` which must be an absolute URI to an image.

Generate Documentation
----------------------

[](#generate-documentation)

> Change the path to your bookdown.json file.

See the [documentation example](https://github.com/tobiju/bookdown-bootswatch-templates-example). It can be compiled using [bookdown](http://bookdown.io) and [Docker](https://www.docker.com/). The following example uses the [Docker Bookdown](https://hub.docker.com/r/sandrokeil/bookdown/) and you can use it also out of the box for your project.

The style is set by an environment `CSS_BOOTSWATCH` variable and the PRISM style by `CSS_PRISM`. Here is an example for the `superhero` style with the prism `coy` style.

```
$ docker run -it --rm -e CSS_BOOTSWATCH=superhero -e CSS_PRISM=coy -v $(pwd):/app sandrokeil/bookdown doc/bookdown.json
$ docker run -it --rm -p 8080:8080 -v $(pwd):/app php:5.6-cli php -S 0.0.0.0:8080 -t /app/doc/html
```

or for Bookdown via Composer.

```
$ export CSS_BOOTSWATCH=superhero && export CSS_PRISM=coy && php ./vendor/bin/bookdown doc/bookdown.json
$ php -S 0.0.0.0:8080 -t doc/html/
```

Then browse to

Bookdown Bootswatch templates in action
---------------------------------------

[](#bookdown-bootswatch-templates-in-action)

Here are some documentation examples generated with this Bookdown.io template.

- [prooph components](http://getprooph.org/)
- [interop-config](http://sandrokeil.github.io/interop-config/)

Further Information
-------------------

[](#further-information)

- [Bookdown](https://github.com/bookdown/Bookdown.Bookdown)
- [Bootswatch](https://bootswatch.com/)
- [PrismJS](http://prismjs.com/)
- [Docker Bookdown image with these templates](https://hub.docker.com/r/sandrokeil/bookdown/)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 74.8% 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.

###  Release Activity

Cadence

Every ~91 days

Recently: every ~114 days

Total

6

Last Release

3369d ago

Major Versions

0.3.0 → 1.0.02016-03-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14201950?v=4)[Tobias Jüschke](/maintainers/tobiju)[@tobiju](https://github.com/tobiju)

---

Top Contributors

[![tobiju](https://avatars.githubusercontent.com/u/14201950?v=4)](https://github.com/tobiju "tobiju (83 commits)")[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (21 commits)")[![asperling](https://avatars.githubusercontent.com/u/1222589?v=4)](https://github.com/asperling "asperling (7 commits)")

---

Tags

documentationmarkdownsyntaxtemplatesmanualstatic-sitedocshighlightingdocbookbookdown

### Embed Badge

![Health badge](/badges/tobiju-bookdown-bootswatch-templates/health.svg)

```
[![Health](https://phpackages.com/badges/tobiju-bookdown-bootswatch-templates/health.svg)](https://phpackages.com/packages/tobiju-bookdown-bootswatch-templates)
```

###  Alternatives

[bookdown/themes

Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting

1135.7k1](/packages/bookdown-themes)[bookdown/bookdown

Provides DocBook-like rendering of Markdown files.

8257.6k16](/packages/bookdown-bookdown)[justinwalsh/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

4.6k38.1k1](/packages/justinwalsh-dauxio)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[georgringer/doc

Render documentation based on markdown files directly in the backend

2232.7k](/packages/georgringer-doc)

PHPackages © 2026

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