dokuzbir
Is there a way download hexdocs as pdf, epub etc?
Is there a way download hexdocs as pdf, epub etc…
Marked As Solved
maqbool
$ mix docs HTML version of docs
$ mix docs --formatter epub epub version of docs
To learn more options
mix help docs
Also Liked
Gazler
If the project is published with the epub formatter then you can download it fro hex using the following format:
https://hexdocs.pm/package/Package.epub
Here’s Phoenix for example:
https://hexdocs.pm/phoenix/Phoenix.epub
alexgaribay
OvermindDL1
You can also set the environment via MIX_ENV=docs mix docs ... too. ![]()
The default environment is dev.
Also, for note, by removing the only: ... then ex_docs will deploy to production with your app too, which is almost certainly not what you want.
OvermindDL1
LostKobrakai
I don’t want to take away from the wish to have more flexibility. But I’d want to add that it would come at a cost. PDF is more complex in many steps involved. It’s quite a bit more complex to setup and maintain the code to layout a pdf. It also often needs a bunch of external tooling (or even more elixir native development) to actually create the final pdf. I wouldn’t expect the ex_doc team to pick that up.
But ex_doc formatters can be added on by third parties as well. If someone wants to take a stab at a pdf formatter there should be nothing holding that effort back.







