Metadata-Version: 2.4
Name: mkdocs-adr-plugin
Version: 0.2.0
Summary: MkDocs plugin with floating button to create ADR via web UI
Author-email: Mikhail Maresin <mikhailmaresin@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/maresin/mkdocs-adr-plugin
Project-URL: Repository, https://github.com/maresin/mkdocs-adr-plugin.git
Project-URL: Issues, https://github.com/maresin/mkdocs-adr-plugin/issues
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Framework :: MkDocs
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mkdocs>=1.3.0
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: pydantic
Dynamic: license-file

# MkDocs ADR Plugin

A plugin for [MkDocs](https://www.mkdocs.org/) that adds a floating button to create **Architecture Decision Records** (ADR) directly from the documentation UI.

## Features

- 🔘 Floating button with a modal form
- ✏️ Edit template content before saving
- 🔢 Automatic numbering and date substitution
- 📁 Select template from `docs/adr/templates/`
- 🌐 Works with any MkDocs theme
- 🐧 Cross‑platform (Linux, macOS, Windows)

## Installation

```bash
pip install mkdocs-adr-plugin
```

## Usage

### Start the server

From your project root (where `mkdocs.yml` is located), run:

```bash
mkdocs-adr
```

This starts both the ADR API (FastAPI) and `mkdocs serve` in one terminal.

### Create an ADR

1. Open `http://localhost:8000`
2. Click the **+** button in the bottom‑right corner
3. Fill in the form:
   - **Slug** – filename part (only letters, digits, hyphen, underscore)
   - **Title** – full ADR title (optional, defaults to slug)
   - **Template** – choose one from `docs/adr/templates/`
   - **Content** – edit the Markdown content as needed
4. Click **Save** – the new ADR file will be created in `docs/adr/` and the page reloads.

### Configuration in `mkdocs.yml`

```yaml
plugins:
  - adr_plugin:
      api_url: http://localhost:8765   # optional, default is this
```

## Custom Templates

Put `.md` files inside `docs/adr/templates/`. You can use the following placeholders:

- `{{NUMBER}}` – auto‑incremented number (0001, 0002…)
- `{{TITLE}}` – title from the form
- `{{DATE}}` – current date (ISO 8601)

The default template is created automatically on first run.

## License

MIT
