Foreword
Few days ago we was meet online with @dumbbell to discuss awesome CSS/JavaScript style what he made for amazing library khepri(here this documentation The khepri application). I’m ask if he don’t mind if will be created a rebar plugin where any project which uses this plugin can be able to use the same styles - and yey, he wasn’t mind . Meet new plugin rebar3_edoc_extensions!
Usage
- Add into
rebar.config
:{project_plugins, [rebar3_edoc_extensions]}.
- Run command for build Erlang documentation for project:
rebar3 edoc_extensions
3d party of CSS
/JavaScript
- Used https://prismjs.com
- Used github-markdown-css
Notes
Under hood of course used updating state of edoc_opts
section in rebar.config
. So, make sure that you don’t use any important/specific configuration for options: stylesheet
, xml_export
, layout
, doclet
. As before can be defined overview.edoc
- new styles also will applied automatically for this file. Also you don’t need to call rebar3 edoc
- the command rebar3 edoc_extensions
will generate documentation use the same way. Also, make sure that before publishing your awesome libraries/applications into hex.pm you use rebar3 edoc_extensions
instead of rebar3 edoc
- otherwise only you can see this wonderful design locally, so don’t be greedy and share with users of your libraries/applications on hex.pm.
Afterword
Attentive GitHub user can may notice that this plugin was generated in few second by great rebar template rebar3_plugin what we make with @elbrujohalcon recently.(Rebar3_plugin - a simple rebar3 template to build your own with Rebar3 plugin!). Feel free to save time too withuse the same way!