Is it possible to download Elixir & Phoenix docs as PDF or .mobi?

Is there any possibility to download the Elixir and Phoenix documentation as PDF (or maybe MOBI?)
I am traveling a lot by train and I do not always have connection to the internet, so It would be nice to have the docs always with me.

2 Likes

You can download the Elixir docs here and the Phoenix docs here.

Note these aren’t in PDF but are still viewable offline.

4 Likes

Also note that if you download the source code for any of those projects and run mix docs you’ll have a local copy of the docs.

1 Like

You can download any docs from hex using the mix hex.docs fetch PACKAGE VERSION command and later open with the accompanying mix hex.docs open PACKAGE VERSION.

To enhance on @benwilson512’s remark - ExDoc can also generate .epub documents with mix docs --format epub.

12 Likes

That’s so helpful!
Thank you so much.

Sorry to mention, but after trying to generate an epub…
And as seen on this link https://github.com/elixir-lang/ex_doc

The option should be formatter, like this

$ mix docs --formatter epub
Docs successfully generated.
View them at "doc/Phoenix-v1.3.0-rc.1.epub".

I would like to mention also that generating elixir’s epub is a little bit different.

As mentionned in the building documentation section from https://github.com/elixir-lang/elixir

You should

$ git clone https://github.com/elixir-lang/elixir-lang.github.com.git 
$ git clone git://github.com/elixir-lang/ex_doc.git
$ cd ex_doc && ../elixir/bin/mix do deps.get, compile
$ cd ../elixir 

But before running make docs, You should edit Makefile like this

DOCS_FORMAT = epub

Now You can run

$ make docs
1 Like

No Make file was generated, should I create a makefile myself and what should be in there? thanks

Hello and welcome,

It has been 4 years and since, the procedure has changed.

You might try…

$ git clone https://github.com/elixir-lang/elixir-lang.github.com.git
$ cd elixir-lang.github.com/_epub
$ mix deps.get
$ mix epub
Generated elixir_lang_guide app
Generated guide at "./elixir-getting-started-guide.epub"
Generated guide at "./meta-programming-in-elixir.epub"
Generated guide at "./mix-and-otp.epub"
2 Likes