mix docs.nav (skuld v0.23.0)

View Source

Injects navigation headers and footers into documentation files.

Reads the doc ordering and grouping from mix.exs ExDoc configuration, then injects/replaces navigation links in each markdown file between sentinel markers.

Usage

mix docs.nav          # inject nav into all docs
mix docs.nav --check  # check if nav is up to date (exits 1 if not)
mix docs.nav --strip  # remove all nav markers

Navigation format

Each doc gets a header (after the # Title line) and footer with:

  • Back link to previous doc in sequence
  • Up link to the group's first doc (or index)
  • Index link to README
  • Forward link to next doc in sequence

The doc order and grouping are read from mix.exs :docs config.

Sentinel markers

Nav blocks are wrapped in HTML comments so they can be found and replaced idempotently:

<!-- nav:header:start -->
...nav links...
<!-- nav:header:end -->