Skip to content

Comments

AI file actions plugins: per page widget and AI resources page#13

Open
dawnkelly09 wants to merge 55 commits intomainfrom
staging-ai-resources-plugin
Open

AI file actions plugins: per page widget and AI resources page#13
dawnkelly09 wants to merge 55 commits intomainfrom
staging-ai-resources-plugin

Conversation

@dawnkelly09
Copy link
Contributor

This pull request introduces new AI-focused plugins and helper libraries for MkDocs, updates documentation to reflect these additions, and improves configuration for AI resource management. The main themes are the introduction of new plugins, documentation enhancements, and configuration improvements for AI resource pages and actions.

New AI Plugins and Helper Libraries:

  • Added the ai_resources_page plugin to automate generation of an "AI Resources" page with a dynamic table of artifact files.
  • Introduced the ai_page_actions plugin, which injects a per-page AI actions widget next to each page's H1 heading at build time.
  • Added two shared libraries: ai_file_actions (convenience wrapper for dropdown generation) and ai_file_utils (centralized action resolution and HTML generation for AI file actions). [1] [2] [3]

Documentation Updates:

  • Expanded the README.md to describe the new plugins and libraries, including their purpose and links to detailed docs.
  • Updated usage examples in README.md to show how to enable the new plugins in mkdocs.yml.
  • Added comprehensive documentation files for ai-page-actions, ai-resources-page, ai-file-actions, and ai-file-utils, detailing their usage, configuration, and integration. [1] [2] [3] [4]

Configuration Improvements:

  • Updated CONTRIBUTING.md to include the new helper_lib/ directory in formatting and linting instructions.
  • Changed llms_config.json schema references in documentation to use categories_info (dictionary with metadata and display order) instead of categories_order (array), improving clarity and flexibility for category management. [1] [2]

Plugin Integration and Usage:

  • Provided code examples and explanations for using the new plugins and libraries, including Python imports and YAML configuration. [1] [2] [3] [4]

AI Action Model and Customization:

  • Documented how to customize AI file actions via a JSON schema, supporting link, clipboard, and LLM tool actions, with dynamic label and prompt interpolation. [1] [2]

These changes collectively make it easier to add, configure, and use AI resource pages and actions in MkDocs-powered documentation sites, while providing robust documentation and helper utilities for future extensibility.

dawnkelly09 and others added 30 commits February 4, 2026 12:14
Co-authored-by: Erin Shaben <eshaben@icloud.com>
Create ai file utils data model and helper script
dawnkelly09 and others added 24 commits February 17, 2026 14:57
Co-authored-by: Erin Shaben <eshaben@icloud.com>
Take origin's version of minify plugin which includes debug mode,
scoped CSS cleanup, and improved fallback pattern matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Brings in latest minify plugin changes (debug mode, scoped CSS cleanup,
improved fallback pattern matching) from colleague's work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract path prefix from site_url so sites deployed under a subpath
(e.g., wormhole.com/docs/) generate correct AI page URLs like
/docs/ai/pages/{slug}.md instead of /ai/pages/{slug}.md.

Adds test suite for ai_page_actions covering slug helpers and
subpath URL generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract base path from site_url so sites deployed under a subpath
(e.g., /docs/) get the correct prefix on all artifact URLs in the
AI Resources table. Adds tests covering root, subpath, and empty
site_url scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Brings in merged PRs #9 (minify update) and #11 (toggle docs) so
staging branch is in sync with main. Minify conflicts resolved by
accepting origin/main version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These files had whitespace/formatting changes that aren't part of this
feature branch. Reverting to keep the PR diff focused.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive AI-focused plugin ecosystem for MkDocs, enabling automated generation of AI-ready documentation resources. The changes add two new plugins (ai_resources_page and ai_page_actions), two shared helper libraries (ai_file_utils and ai_file_actions), and update the existing resolve_md plugin to use an improved configuration schema.

Changes:

  • Added ai_resources_page plugin to automatically generate an AI Resources index page with a table of LLM-optimized artifact files
  • Added ai_page_actions plugin to inject per-page AI action widgets next to H1 headings at build time
  • Introduced shared ai_file_utils library for centralized action resolution and HTML generation with JSON-driven configuration
  • Migrated resolve_md plugin from categories_order (array) to categories_info (dictionary with metadata) for improved category management
  • Added comprehensive test coverage for all new plugins and helper libraries

Reviewed changes

Copilot reviewed 18 out of 26 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
plugins/ai_resources_page/plugin.py Plugin implementation for generating AI resources index page
plugins/ai_resources_page/__init.py__ Package initialization file (contains critical naming error)
plugins/ai_page_actions/plugin.py Plugin for injecting AI action widgets next to H1 headings
plugins/ai_page_actions/__init__.py Package initialization file
helper_lib/ai_file_utils/ai_file_utils.py Core utility for action resolution and HTML generation
helper_lib/ai_file_utils/ai_file_actions.json JSON schema defining available AI actions
helper_lib/ai_file_utils/__init__.py Package initialization file
helper_lib/ai_file_actions/plugin.py Convenience wrapper around ai_file_utils
helper_lib/ai_file_actions/__init__.py Package initialization file
helper_lib/__init__.py Helper library root initialization
plugins/resolve_md/plugin.py Updated to use categories_info instead of categories_order
pyproject.toml Added new plugin entry points and package configuration
tests/ai_resources_page/test_ai_resources_page.py Tests for ai_resources_page plugin with subpath URL handling
tests/ai_page_actions/test_ai_page_actions.py Tests for ai_page_actions plugin including slug building
tests/ai_file_utils/test_ai_file_utils.py Comprehensive tests for ai_file_utils library
tests/ai_file_actions/test_ai_file_actions.py Tests for ai_file_actions wrapper
docs/ai-resources-page.md Documentation for ai_resources_page plugin
docs/ai-page-actions.md Documentation for ai_page_actions plugin
docs/helper_library/ai-file-utils.md Documentation for ai_file_utils library
docs/helper_library/ai-file-actions.md Documentation for ai_file_actions wrapper
docs/resolve-md.md Updated to reflect categories_info schema change
README.md Updated with new plugin and library descriptions
CONTRIBUTING.md Updated to include helper_lib in formatting instructions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants