rebar3_edoc_extensions
is a Rebar 3 plugin bringing improvements to
EDoc-based documentation.
To use this plugin for your project, simply add the plugin to the
project_plugins
list in your rebar.config
configuration:
%% In `rebar.config`.
{project_plugins, [rebar3_edoc_extensions]}.
It overrides the defaut behavior of the rebar edoc
command. Therefore, the
next time you generate the documentation, you will benefit from the
improvements brought by this plugin.
Here is a list of changes this plugin makes to EDoc-generated documentation:
- A table of content of the Overview page is added to the left sidebar.
- The GitHub Markdown stylesheet is used to style the entire documentation.
- PrismJS is used to enable syntax highlighting to literals and code snippets.
The plugin supports a few options to configure the PrismJS syntax highlighting library:
-
Select the version of PrismJS to download:
{prismjs_version, "v1.26.0"}.
The default version is
"v1.26.0"
. -
Select the PrismJS theme:
{prismjs_theme, "twilight"}.
The default theme is
"default"
. -
Select the list of languages to support:
{prismjs_languages, ["erlang", "javascript"]}.
The default languages are
"erlang"
and"elixir"
.
$ rebar3 compile
Add the plugin to your rebar config:
For generate doc
with new style, run:
$ rebar3 edoc