# managoat_docs v0.1.0 - Table of Contents

> A documentation manual embedded at compile time for a Phoenix app to serve, its sanitising markdown renderer, and the guardrail tests that keep it sound.

## Pages

- [Managoat.Docs](readme.md)
- [Changelog](changelog.md)

## Modules

- [Managoat.Docs](Managoat.Docs.md): A documentation manual embedded at compile time, so a Phoenix app can serve
it at a path of its own (`/docs`) instead of publishing a second site.
- [Managoat.Docs.Checks](Managoat.Docs.Checks.md): The structural checks on an embedded manual, as functions that return a
list of failure messages (empty when the manual is sound).
`Managoat.Docs.GuardrailCase` wraps each one as an ExUnit test; they are
functions first so a host can run one from a script, a release task or a
test of its own shape.
- [Managoat.Docs.Compiler](Managoat.Docs.Compiler.md): Pure functions `use Managoat.Docs` runs at compile time to turn the
authoring dialect of a manual into plain markdown. Split out because a
module cannot call its own functions from its own body, and so the
transforms can be tested directly.
- [Managoat.Docs.GuardrailCase](Managoat.Docs.GuardrailCase.md): The structural gate on an embedded manual, as a case template. A host
`use`s it once, in a test file of its own, and gets every check in
`Managoat.Docs.Checks` as an ExUnit test against its real manual. The
test module's body starts with the `use` and goes on to tests about the
manual's content
- [Managoat.Docs.Markdown](Managoat.Docs.Markdown.md): Markdown → HTML, rendered through [MDEx](https://hexdocs.pm/mdex) (comrak),
on two paths that share one pipeline: `to_html/1` for untrusted input
(agent or user output) and `to_trusted_html/1` for an authored manual. Both
return a binary of HTML; a Phoenix caller wraps it in `Phoenix.HTML.raw/1`.
The untrusted path closes two holes that a plain markdown-to-HTML call
leaves open (Fountain #323)

