---
name: "ex_doc"
section: "1"
platform: "linux"
package: "elixir-ex-doc"
version: "0.35.1+dfsg-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ex_doc"
---

# ex\_doc(1)

generate Elixir/Erlang documentation from sources

## NAME

ex\_doc - generate Elixir/Erlang documentation from sources

## SYNOPSIS

**ex\_doc** PROJECT VERSION BEAMS \[*OPTIONS*\]

## DESCRIPTION

ExDoc is a tool to generate documentation for Erlang and Elixir projects. To see an example, \[you can access Elixir's official docs\](https://hexdocs.pm/elixir/).

## FEATURES

ExDoc ships with many features:

  \* Automatically generates online- and offline-accessible HTML and EPUB documents from your API documentation.\
   \* Responsive design, covering phones and tablets.\
   \* Support for custom pages, guides, livebooks and cheatsheets.\
   \* Support for custom grouping of modules, functions, and pages in the sidebar.\
   \* Customizable logo.\
   \* A direct link back to the source code for every documented entity.\
   \* Full-text search.\
   \* Keyboard shortcuts. (Press \`?\` to show help.)\
   \* Quick-search with autocompletion support. (\`s\` keyboard shortcut.)\
   \* Go-to shortcut with auto-complete to take the reader to any HexDocs package documentation. (\`g\` keyboard shortcut.)\
   \* Support for night mode, activated according to the browser preference.\
   \* Tooltips for links to modules and functions, both for the current project and other projects.\
   \* Version dropdown, automatically configured when hosted on HexDocs.

## OPTIONS

- **PROJECT**

  Project name.

- **VERSION**

  Version number.

- **BEAMS**

  Path to compiled beam files.

- **--canonical**

  Indicate the preferred URL with rel="canonical" link element.

- **-c**, **--config**

  Give configuration through a file instead of a command line. See "Custom config" section below for more information.

- **-f**, **--formatter**

  Docs formatter to use (html or epub), default: html and epub.

- **--homepage-url**

  URL to link to for the site name.

- **--language**

  Identify the primary language of the documents, its value must be a valid \[BCP 47\](https://tools.ietf.org/html/bcp47) language tag, default: "en".

- **-l**, **--logo**

  Path to the image logo of the project (only PNG or JPEG accepted) The image size will be 64x64 and copied to the assets directory.

- **-m**, **--main**

  The entry-point page in docs, default: "api-reference".

- **-o**, **--output**

  Path to output docs, default: "doc".

- **--package**

  Hex package name.

- **--paths**

  Prepends the given path to Erlang code path. The path might contain a glob pattern but in that case, remember to quote it: --paths "\_build/dev/lib/\*/ebin". This option can be given multiple times.

- **--proglang**

  The project's programming language, default: "elixir".

- **-q**, **--quiet**

  Only output warnings and errors.

- **--source-ref**

  Branch/commit/tag used for source link inference, default: "master".

- **-u**, **--source-url**

  URL to the source code.

- **-v**, **--version**

  Print ExDoc version.

## EXAMPLES

ex\_doc "Ecto" "0.8.0" "\_build/dev/lib/ecto/ebin" -u "https://github.com/elixir-ecto/ecto"

ex\_doc "Project" "1.0.0" "\_build/dev/lib/project/ebin" -c "docs.exs"

## CUSTOM CONFIG

A custom config can be given with the \`--config\` option.

The file must either have ".exs" or ".config" extension.

The file with the ".exs" extension must be an Elixir script that returns a keyword list with the same options declares in \`Mix.Tasks.Docs\`. Here is an example:

        \[\
           extras: Path.wildcard("lib/elixir/pages/\*.md"),\
           groups\_for\_docs: \[\
             Guards: & &1\[:guard\] == true\
           \],\
           skip\_undefined\_reference\_warnings\_on: \["compatibility-and-deprecations"\],\
           groups\_for\_modules: \[\
             ...\
           \]\
         \]

The file with the ".config" extension must contain Erlang terms separated by ".". See \`:file.consult/1\` for more information. Here is an example:

        {extras, \[\<\<"README.md"\>\>, \<\<"CHANGELOG.md"\>\>\]}.\
         {main, \<\<"readme"\>\>}.\
         {proglang, erlang}.

## SOURCE LINKING

ExDoc by default provides links to the source code implementation as long as \`--source-url\` or \`--source-url-pattern\` is provided. If you provide \`--source-url\`, ExDoc will inflect the url pattern automatically for GitHub, GitLab, and Bitbucket URLs. For example:

        \--source-url "https://github.com/elixir-ecto/ecto"

Will be inflected as:

        https://github.com/elixir-ecto/ecto/blob/master/%{path}#L%{line}

To specify a particular branch or commit, use the \`--source-ref\` option:

        \--source-url "https://github.com/elixir-ecto/ecto" --source-ref "v1.0"

will result in the following URL pattern:

        https://github.com/elixir-ecto/ecto/blob/v1.0/%{path}#L%{line}

## AUTHORS

Plataformatec & The Elixir Team.
