This is how you can conver the react docs to a .ePub / Kindle (.mobi) file to read in an eReader (or eReader app):
- Make sure you have Pandoc available (on a Mac, it can be installed by
brew install pandoc
via Homebrew) - Checkout or download master from the React docs repo [https://github.com/reactjs/reactjs.org]
- go to
content/docs
- run the following commands in a shell (builds one markdown in order of navigation):
echo '' > ALL.md
for i in $(cat nav.yml | grep 'id:' | awk -F: '{print$2}')
do
cat "$i.md" >> ALL.md
done
- convert to an epub via
pandoc ALL.md -o ALL.epub
- Open All.epub in Calibre
- edit metadata (and poss. convert to MOBI via Conversion)
git clone [email protected]:reactjs/react.dev.git
cd react.dev/src/content/learn
pandoc *.md -o learn.epub
cd ../reference/react
pandoc *.md -o reference.epub
The markdown files can probably be combined into one epub, but I wanted to have them separate for my use case. I do get some errors, but seems like it might just be broken images... assuming the epub still works, I don't mind broken images for my use case.