EX_DOC(1)

πŸ’– EX_DOC(1) β€” the ex_doc manual page, but make it cute πŸ’–

okay so bestie, you're holding the manual page for ex_doc, straight out of Debian GNU/Linux. she generates Elixir/Erlang documentation from sources and she's that girl. let's get into it πŸŽ€


✨ 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. literally what she does, no notes πŸ’…

wanna see her in action? to see an example, [you can access Elixir's official docs](https://hexdocs.pm/elixir/). go look, it's giving main character energy fr fr πŸ‘‘


🌈 FEATURES 🌈

ExDoc ships with many features, and honestly? the way that she has so many features. obsessed:

  • 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 β€” the project name. yes queen, name her.
  • VERSION β€” the 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 the "Custom config" section below for more info, bestie. πŸ“„
  • -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 🌸

look at her go, two iconic little invocations:

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. no other vibes accepted, sorry not sorry.

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.


and that's the whole page, bestie 🫢 this Debian build is version 0.31.1+dfsg-1, dated 2024-03-02, and it lives in the EX_DOC(1) slot of the ExDoc for Debian GNU/Linux manual. periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from