ex_dash v0.1.3 ExDash.Injector behaviour

Injector sets Dash Anchors and makes style tweaks to passed ExDoc HTML files.

Dash Anchors are used within Dash to build the Table of Contents per page.

Currently supported:

  • Types
  • Functions
  • Macros
  • Callbacks

Style tweaks include hiding the sidebar and padding tweaks to match Dash’s Hex Doc styles.

Summary

Functions

Returns a list of ids for the given selector and parse function

inject_all/1 takes a path to an html file and runs some injections over it

Types

doc_path()
doc_path() :: String.t
html_content()
html_content() :: String.t
id()
id() :: String.t

Functions

find_ids_in_list(html_content, list_selector, id_parser)
find_ids_in_list(html_content, String.t, (html_content -> String.t)) :: [id]

Returns a list of ids for the given selector and parse function.

inject_all(doc_path)
inject_all(doc_path) :: none

inject_all/1 takes a path to an html file and runs some injections over it.

The updated html is then re-written to the same path.

Callbacks

find_ids(html_content)
find_ids(html_content) :: [id]
match_and_anchor(id)
match_and_anchor(id) :: [{String.t, String.t}]