GithubHelp home page GithubHelp logo

doc22940 / starter-book Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saravieira/starter-book

0.0 1.0 0.0 2.31 MB

A book starter to kickstart your writing journey ๐ŸŽ‰

Home Page: https://wizardly-snyder-c98440.netlify.com/

License: MIT License

JavaScript 54.35% HTML 0.66% SCSS 44.99%

starter-book's Introduction

Book Starter

A starter built with gatsby to help you create books with ease.

  • ๐Ÿ“– Create Book from markdown files
  • ๐Ÿ–ผ Generate PDF with Light and Dark Mode
  • ๐Ÿ“š Generates Epub file
  • ๐Ÿ‘ฉโ€๐Ÿ’ป Creates a preview site

PDF Light Example

PDF Dark Example

Epub Example

Website Example (add ?theme=dark to preview dark version)

How to use

  1. First git clone and cd into the folder
git clone [email protected]:SaraVieira/starter-book.git my-book && cd my-book
  1. Edit your book in the book.md

  2. Set you book properties in bookInfo.js

  3. Run yarn build

    4.1. You can also run yarn build:site to build just the preview site

    4.2. Or run yarn build:book for the PDF and Epub files

  4. To get the .mobi file download the Kindle Previewer and drag your .epub file and it creates a kindle compatible file.

  5. Profit??

FAQ

How can I edit the CSS?

The CSS is located in ./src/styles/style.scss and you can edit it there. At the bottom you will see all the styles specific for the dark version.

How can I change the Prism theme?

I import the prism theme in ./src/pages/index.js and in there you can use any theme or make your own and use it by importing. I made a tool you can see here that helps you make your VSCode theme into a prism theme easily.

The chapters are screwed up in my version

I use a really HUUUUGE hack to get them, I go through every H1 created by the markdown file and make that into a chapter so I can only recognize H1's as chapters at least until I find a better way :( If you want to try and fix that the code is at ./generate-book/epub.js.

Why?

I built this in order to be able to publish a book I wrote and I think it may be useful for someone so I made it open source.

Books using this:

Let me know if you are using this to make your book :)


Any issues please make a PR or file a bug

Licensed under the MIT license

starter-book's People

Contributors

saravieira avatar

Watchers

 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.