> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# README MARKDOWN

# Markdown Generation for LLM Consumption

This directory contains both `.mdx` (source) and `.md` (generated) files.

## Overview

* **`.mdx` files**: Source files with Mintlify JSX components (Frame, CardGroup, etc.)
* **`.md` files**: Generated pure markdown files for LLM consumption

## Why Both Formats?

1. **MDX for Mintlify**: The `.mdx` files are used by Mintlify to render the interactive documentation site at [https://docs.anomalyarmor.ai](https://docs.anomalyarmor.ai)
2. **Markdown for LLMs**: The `.md` files provide clean markdown without HTML/JSX components

## Accessing Clean Markdown

LLMs and documentation tools can access clean markdown files via the public API endpoint:

```
GET https://api.anomalyarmor.ai/api/public/docs/{path}.md
```

**Examples**:

* `https://api.anomalyarmor.ai/api/public/docs/introduction.md`
* `https://api.anomalyarmor.ai/api/public/docs/quickstart/connect-first-database.md`
* `https://api.anomalyarmor.ai/api/public/docs/concepts/overview.md`

This endpoint:

* Serves clean markdown without JSX components
* Requires no authentication
* Has 1-hour caching for performance
* Protects against path traversal attacks

See `backend/app/shared/api/public/markdown.py` for implementation details (TECH-787).

## Generating Markdown Files

To regenerate all `.md` files from `.mdx` sources:

```bash theme={null}
cd customer-docs
node build-markdown.js
```

This converts:

* `<Frame>` components → extracted content with captions
* `<CardGroup>` and `<Card>` → markdown lists with links
* `<Tabs>` and `<Tab>` → markdown sections
* `<img>` tags → markdown image syntax
* Frontmatter → markdown headers

## Automatic Regeneration

The `.md` files are automatically regenerated by GitHub Actions whenever:

* `.mdx` files are modified on the `main` branch
* The `build-markdown.js` script is updated

See `.github/workflows/docs-build-markdown.yml` for the automation.

## Do Not Edit .md Files Directly

The `.md` files are generated files. Always edit the `.mdx` source files instead.
Changes to `.md` files will be overwritten the next time the build script runs.
