Skip to content

ahmedengu/Functional-Light-JS-ydkjs-epub

 
 

Repository files navigation

Functional-Light JS, You Don't Know JS and You Don't Know JS Yet ePub

Functional Light JS, You Don't Know JS and You Don't Know JS Yet ePub generator.

Generate the ePub

Run with Docker:

# force update to the latest image
docker pull ahmedengu/fljs-ydkjs-epub

# generate epub into output folder
docker run --rm -it -v $PWD/output:/root/output ahmedengu/fljs-ydkjs-epub

Then the generated epub files are in output folder:

Customization

First, recursively clone this repo to your machine:

git clone --recursive https://github.com/ahmedengu/Functional-Light-JS-ydkjs-epub.git

Then you can:

  • Modify epub.css to customize the style.
  • Read gen.sh to understand how the generator works.
  • Fetch the latest book content using git submodule command under Functional-Light-JS, 1st-ed and 2nd-ed directory.

Finally, rebuild the Docker image and generate your own version epubs:

docker build -t fljs-ydkjs-epub .
docker run --rm -it -v $PWD/output:/root/output fljs-ydkjs-epub

additional Note (to get latest content)

# initial your git submodule in your local repo
git submodule init

# Change to the submodule directory
# replace 'submodule_dir' with '1st-edition' & '2nd-edition' respectively
cd submodule_dir

# Checkout desired branch
# replace 'master' with updated branch respectively
# At 2020/07/05, it is '1st-ed' and '2nd-ed' respectively

git checkout master

# Update
git pull

# Get back to your project root
cd ..

Known Issues & TODOs

  • Support syntax highlighing (The latest pandoc does support syntax highlight, but the genrated ePub cannot be correctly rendered by iBooks app.)

Releases

No releases published

Packages

No packages published

Languages

  • Shell 78.8%
  • CSS 18.8%
  • Dockerfile 2.4%