Skip to content

vkatsuba/rebar3_edoc_extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebar3_edoc_extensions

Hex.pm Version Hex.pm Downloads Hex.pm Documentation Erlang Versions Build Status

rebar3_edoc_extensions is a Rebar 3 plugin bringing improvements to EDoc-based documentation.

Getting started

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.

EDoc improvements

Here is a list of changes this plugin makes to EDoc-generated documentation:

  1. A table of content of the Overview page is added to the left sidebar.
  2. The GitHub Markdown stylesheet is used to style the entire documentation.
  3. PrismJS is used to enable syntax highlighting to literals and code snippets.

Configuration

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".

Build

$ rebar3 compile

Use

Add the plugin to your rebar config:

For generate doc with new style, run:

$ rebar3 edoc