Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
ExDoc generates HTML, EPUB, and Markdown documentation for Erlang and Elixir projects.
ExDoc is a documentation generator for Erlang and Elixir projects that compiles API documentation into offline-accessible HTML, Markdown (including llms.txt), and EPUB output, and it is the tool behind Elixir's official docs on HexDocs.
ExDoc is an open-source tool maintained under the elixir-lang GitHub organization, built for creating documentation sites from Elixir @moduledoc / @doc attributes or Erlang EDoc annotations. It takes compiled .beam files in ebin directories as input, plus optional extras such as README.md files, .cheatmd cheatsheets, and .livemd livebooks, and produces searchable HTML, EPUB, Markdown, and llms.txt output. You can run it via Mix for Elixir projects, via Rebar3 for Erlang projects, or as a standalone escript from the command line.
llms.txt), and EPUB documents automatically..cheatmd cheatsheets, and .livemd Livebooks as additional documentation pages.s shortcut), and a g shortcut to jump to any HexDocs package documentation.makeup_LANGUAGE packages, for example makeup_html, to highlight more languages.before_closing_head_tag and before_closing_body_tag configuration, and listen for the exdoc:loaded JavaScript event.mix docs to generate a documentation site with version dropdown and "Go to latest" notifications when hosted on HexDocs.rebar3_ex_doc (for OTP 24 and later) to render EDoc-written documentation into HTML and EPUB..livemd Livebooks, quick-reference cheatsheets as .cheatmd, and long-form guides as Markdown extras.mix docs after adding the ex_doc Hex package to your dependencies, then customize output with :name, :source_url, :homepage_url, and docs: [main: ..., logo: ..., extras: [...]] options.ex_doc escript with project name, version, and one or more ebin directories, and optionally point to a main module and source URL.ebin directories to the CLI so modules are grouped by application, and override that grouping with a custom groups_per_modules option.before_closing_head_tag and before_closing_body_tag to inject JavaScript for rendering TeX math with KaTeX, Vega-Lite plots, or Mermaid graphs.Add ExDoc as a Mix dependency (requires Elixir v1.15 or later), or install it as an escript with mix escript.install hex ex_doc. Document your modules and functions using @moduledoc, @doc, and metadata keys like since and deprecated, or use Erlang EDoc annotations. Run mix docs or the ex_doc executable with your project details, and ExDoc reads the compiled ebin directories, parses the documentation, renders all Markdown content, and outputs the final HTML, EPUB, and Markdown files to the doc directory.
earmark_parser) needs the Erlang development environment (for example, erlang-dev on Debian); any documentation generated by ExDoc or derivative works must display a visible link back to the ExDoc repository.EDoc is the built-in Erlang documentation generator; ExDoc can read EDoc annotations and render them into more modern output. HexDocs is the hosting platform where ExDoc-generated docs are commonly published.
Yes, the ExDoc source code is released under the Apache 2 License, and you can use it without cost. The generated documentation must follow the license's attribution requirement by linking back to the ExDoc repository.
For Mix usage, ExDoc requires Elixir v1.15 or later. Erlang projects on OTP 24 and above can use ExDoc through rebar3_ex_doc or the CLI.
Yes, ExDoc supports Erlang projects. You can use the standalone ex_doc escript or the rebar3_ex_doc plugin with OTP 24+, and it will render documentation written with EDoc annotations.
Set the :extras option in your project config to a list of file paths. Supported formats include Markdown (.md), cheatsheets (.cheatmd), and Livebooks (.livemd), which will appear alongside the API reference.
Yes, ExDoc uses the Makeup project for highlighting. You can add the corresponding makeup_LANGUAGE package, such as makeup_html or makeup_css, to your Mix or Rebar3 dependencies, and those languages will be highlighted.
