EX_DOC(1) | ExDoc for Debian GNU/Linux | EX_DOC(1) |
ex_doc - generate Elixir/Erlang documentation from sources
ex_doc PROJECT VERSION BEAMS [OPTIONS]
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/).
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.
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"
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}.
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}
Plataformatec & The Elixir Team.
2024-03-02 | 0.31.1+dfsg-1 |