leafpub editorconfig Packagist gulp npm

Simple, beautiful, open source publishing.


Simple, beautiful publishing.

Created by Cory LaViska

Maintained by Marc Apfelbaum



  • PHP 5.5+
  • MySQL 5.5.3+


This is the development repo! You’ll need to build Leafpub using the instructions below before running it.

Download the latest ready-to-use version from: https://www.leafpub.org/download


Leafpub uses Composer and NPM to manage dependencies and Gulp as its task runner. To contribute to this project, you’ll need to clone the repository and install the required development tools listed below.

Please read through our contributing guidelines.


Once you have the necessary development tools installed:

  1. Open a terminal
  2. Navigate to the root directory of your cloned repo
  3. Run the following command:
composer install

Composer will install its own dependencies and then run npm install. This may take a few minutes as packages are downloaded. Once complete, Composer will trigger gulp build which will generate all the assets you need to run Leafpub.

Important: You’ll also need to add the default theme to content/themes/range/ manually. This will happen automatically once Leafpub is out of beta.

Using Gulp

From the root directory, you can use gulp help to see all available tasks:

    gulp [TASK] [OPTIONS...]

Available tasks
    build          Run all build tasks. [build:fonts, build:images, build:prune, build:scripts, build:styles]
    build:fonts    Build font assets. [clean:fonts]
    build:images   Optimize images. [clean:images]
    build:prune    Prune unused files from vendor packages.
    build:scripts  Build scripts. [jshint, clean:scripts]
    build:styles   Build styles. [clean:styles]
    clean          Clean up generated files. [clean:fonts, clean:images, clean:scripts, clean:styles]
    clean:fonts    Delete generated fonts.
    clean:images   Delete generated images.
    clean:scripts  Delete generated scripts.
    clean:styles   Delete generated styles.
    default        Run the default task. [watch]
    help           Display this help text.
    jshint         Lint source scripts with JSHint.
    release:clean  Delete all generated releases.
    release:make   Generate a release.
    watch          Watch for script and style changes.

For development, use gulp watch to automatically compile Sass/JavaScript as you work.


You can run Leafpub on PHP’s built in web server using the following command:

php -S localhost:8080 -t app

Then open http://localhost:8080 in your browser.

Note: You might need to use instead of localhost in your database config!


Leafpub is maintained under the Semantic Versioning guidelines and we adhere to them as closely as possible.


Cory LaViska

Marc Apfelbaum


©2016 Cory & Marc

This software is copyrighted. You may use it under the terms of the GNU GPLv3 or later. See LICENSE.md for licensing details.

All code is copyright 2016 Cory & Marc except where noted. Third-party libraries are copyrighted and licensed by their respective owners.

Theme & Plugin Policy

We do not consider Leafpub themes and plugins to be derivative works, as they are used to extend and enhance the software’s functionality strictly through its API and they do not in any way modify Leafpub’s core codebase. Therefore, in our opinion, themes and plugins may be licensed completely at the author’s discretion.


Please visit leafpub.org/support for support.

“The starting point of all achievement is desire.” — Napoleon Hill

Related Repositories



Simple, beautiful, open source publishing. ...



The default theme for Leafpub. ...

Top Contributors

karsasmus claviska takeshi81 PanArnaud micalm WebCrew napolux PabloJoan fedesanchez AfonsoGomes cyrilreze icaromh kevit-development hengkit NinoSkopac naseweis520 thedewil


-   1.2.0-beta6 zip tar
-   1.2.0-beta5 zip tar
-   1.2-beta4 zip tar
-   1.2-beta3 zip tar
-   1.2-beta2 zip tar
-   1.2-beta1 zip tar
-   1.1.8 zip tar
-   1.1.7 zip tar
-   1.1.6 zip tar
-   1.1.5 zip tar
-   1.1.4 zip tar
-   1.1.3 zip tar
-   1.1.2 zip tar
-   1.1.1 zip tar
-   1.1.0 zip tar
-   1.1.0-beta4 zip tar
-   1.1.0-beta3 zip tar
-   1.1.0-beta2 zip tar
-   1.1.0-beta1 zip tar
-   1.0.0 zip tar
-   1.0.0-beta8 zip tar
-   1.0.0-beta7 zip tar
-   1.0.0-beta6 zip tar
-   1.0.0-beta5 zip tar
-   1.0.0-beta4 zip tar
-   1.0.0-beta3 zip tar
-   1.0.0-beta2 zip tar
-   1.0.0-beta1 zip tar
-   1.0.0-RC1 zip tar