Metadata-Version: 2.5
Name: mkdocs-page-actions
Version: 1.0
Summary: Add contextual copy, Markdown, and AI actions to MkDocs pages
Project-URL: Homepage, https://github.com/byrnereese/mkdocs-page-actions
Project-URL: Repository, https://github.com/byrnereese/mkdocs-page-actions
Project-URL: Issues, https://github.com/byrnereese/mkdocs-page-actions/issues
Author: Byrne Reese
License: MIT
License-File: LICENSE
Keywords: documentation,markdown,mkdocs
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: MkDocs
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: mkdocs>=1.6
Provides-Extra: test
Requires-Dist: mkdocs-material>=9.6; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# mkdocs-page-actions

`mkdocs-page-actions` adds a compact page menu for:

- copying the current page's Markdown;
- viewing the Markdown in a new tab;
- editing the page on GitHub when MkDocs provides an edit URL;
- opening the page as context in ChatGPT; and
- opening the page as context in Claude.

[View the live demo and documentation](https://byrnereese.github.io/mkdocs-page-actions/).

## Installation

```bash
pip install mkdocs-page-actions
```

Enable the plugin in `mkdocs.yml`:

```yaml
plugins:
  - search
  - page-actions
```

Actions are enabled on every page by default. Disable them on one page with
front matter:

```yaml
---
page_actions: false
---
```

To make actions opt-in across a site, set `default: false`, then enable the
pages that need them:

```yaml
plugins:
  - page-actions:
      default: false
```

```yaml
---
page_actions: true
---
```

Set `enabled: false` to disable the plugin and its assets entirely. A page-level
setting cannot override `enabled: false`.

Expose only the actions that fit your site:

```yaml
plugins:
  - page-actions:
      actions:
        copy: true
        view_markdown: true
        edit: true
        chatgpt: false
        claude: false
```

## mkdocs-openapi integration

Pages generated by `mkdocs-openapi` include `page_actions: true` in their
front matter. If this plugin is installed and enabled, those pages therefore
show actions even when the site uses `default: false`. Neither plugin imports
or requires the other.

## Theme support

The bundled styles integrate with Material for MkDocs and include fallback
colors for other themes. The control is inserted at the beginning of the
rendered page content.

## Development

```bash
python -m pip install -e '.[test]'
pytest
mkdocs serve
```

The root `mkdocs.yml` and `docs/` directory form the project's test and
documentation site. Pushes to `main` build it with `--strict` and deploy it to
GitHub Pages.

