# `mix skuld.docs.nav`
[🔗](https://github.com/mccraigmccraig/skuld/blob/main/mix_tasks/skuld/docs/nav.ex#L1)

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 skuld.docs.nav          # inject nav into all docs
    mix skuld.docs.nav --check  # check if nav is up to date (exits 1 if not)
    mix skuld.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
- Umbrella link to the umbrella architecture page (if `:umbrella_home` is configured)

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
