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. (
skeyboard shortcut.) β‘ - Go-to shortcut with auto-complete to take the reader to any HexDocs package documentation. (
gkeyboard 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 withrel="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 (htmlorepub), default:htmlandepub.--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
- debian trixie: elixir-ex-doc 0.35.1+dfsg-4 Β· Apache-2.0
- ubuntu questing: elixir-ex-doc 0.35.1+dfsg-4
- ubuntu resolute: elixir-ex-doc 0.35.1+dfsg-4build1 Β· Apache-2.0
- ubuntu stonking: elixir-ex-doc 0.35.1+dfsg-10build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms