Git Product home page Git Product logo

book-project-template's Introduction

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. For more a more detailed writeup of how the code works, please read the companion article here. You can also leave your questions there.

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

Requirements

This is a Symfony LTS application so you need to have PHP (minimum version 7.1.3) as well as composer installed. Besides that, the application also needs prince (for PDF generation) and pandoc (for epub generation) installed.

You can install these two tools using homebrew on MacOS:

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

Installation

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

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

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 for a detailed explanation of the code and how to modify it to write your own book.

book-project-template's People

Contributors

carlalexander avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.