Skip to content

Comments

Adds per-page AI file actions plugin#12

Merged
eshaben merged 14 commits intostaging-ai-resources-pluginfrom
adds-per-page-ai-actions
Feb 24, 2026
Merged

Adds per-page AI file actions plugin#12
eshaben merged 14 commits intostaging-ai-resources-pluginfrom
adds-per-page-ai-actions

Conversation

@dawnkelly09
Copy link
Contributor

This pull request introduces three new AI-focused MkDocs plugins—ai_resources_page, ai_file_actions, and ai_page_actions—along with comprehensive documentation and updates to the shared ai_file_utils library. These plugins automate the creation of an "AI Resources" page, add split-button dropdowns for AI-related file actions, and inject per-page AI action widgets, all leveraging a centralized JSON action model. The documentation has been expanded to explain configuration, usage, and integration details for these new features, and the shared library has been enhanced for greater flexibility and clarity.

New AI Plugins and Features:

  • Added ai_resources_page, ai_file_actions, and ai_page_actions plugins, each with detailed documentation (docs/ai-resources-page.md, docs/ai-file-actions.md, docs/ai-page-actions.md). These automate AI resource page generation, provide file action dropdowns, and inject per-page AI widgets, respectively. [1] [2] [3] [4] [5] [6]

Enhancements to Shared Library (ai_file_utils):

  • Expanded the documentation for ai_file_utils to clarify its role as a shared library for action resolution and HTML generation, including new API examples, parameter explanations, and helper methods for slug/URL building and page exclusion.
  • Updated the action model schema to support new fields (icon, trailingIcon, primary) for richer UI, clarified interpolation variables (including site_url), and improved prompt template handling. [1] [2]

Configuration and Integration Updates:

  • Standardized on a new categories_info dictionary in llms_config.json for category metadata and display order, replacing the old categories_order array. [1] [2]
  • Documented how exclusion rules and plugin settings are managed centrally via ai_file_actions.json and llms_config.json. [1] [2] [3]

Code Additions:

  • Implemented the AiFileActionsPlugin class as a thin MkDocs plugin wrapper that delegates to AIFileUtils for dropdown HTML generation, enabling plugin discovery and future extensibility.

These changes provide a unified, extensible system for managing AI-related artifacts and actions in MkDocs-based documentation sites, making it easier to integrate LLM tools and file utilities across your docs.

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 pull request introduces three new AI-focused MkDocs plugins—ai_resources_page, ai_file_actions, and ai_page_actions—along with comprehensive documentation and significant enhancements to the shared ai_file_utils library. The changes enable automated generation of AI resource pages, provide split-button dropdown UI components for AI-related file actions, and inject per-page AI action widgets into documentation.

Changes:

  • Added three new plugins: ai_resources_page (generates AI resources overview page), ai_file_actions (thin wrapper for action resolution), and ai_page_actions (injects per-page action widgets)
  • Enhanced ai_file_utils shared library with HTML generation capabilities, slug/URL building helpers, and page exclusion logic
  • Migrated configuration from categories_order array to categories_info dictionary structure with category metadata
  • Updated resolve_md plugin to use the new categories_info structure throughout
  • Applied code formatting improvements (Black/isort) to existing plugins (minify, page_toggle, copy_md)
  • Added comprehensive test coverage for the new functionality
  • Provided detailed documentation for all new plugins and updates

Reviewed changes

Copilot reviewed 20 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/ai_resources_page/plugin.py New plugin that generates AI Resources page with dynamic table of artifact files
plugins/ai_file_actions/plugin.py Thin wrapper plugin delegating to AIFileUtils for MkDocs discovery
plugins/ai_page_actions/plugin.py Plugin that injects AI action widgets next to H1 headings
plugins/ai_file_utils/ai_file_utils.py Enhanced shared library with action resolution, HTML generation, and helper methods
plugins/ai_file_utils/ai_file_actions.json Updated action schema with new fields (icon, trailingIcon, primary) and pageWidget config
plugins/resolve_md/plugin.py Migrated to categories_info structure with metadata support
pyproject.toml Added new plugin entry points and package data configuration
tests/ai_file_utils/test_ai_file_utils.py Enhanced tests including new dropdown HTML generation tests
tests/ai_file_actions/test_ai_file_actions.py New comprehensive test suite for the plugin
docs/*.md New and updated documentation for all plugins and changes

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

@dawnkelly09 dawnkelly09 marked this pull request as ready for review February 18, 2026 22:11
dawnkelly09 and others added 3 commits February 20, 2026 14:38
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>
@dawnkelly09 dawnkelly09 requested a review from eshaben February 20, 2026 22:51
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>
Copy link
Collaborator

@eshaben eshaben left a comment

Choose a reason for hiding this comment

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

I'm still seeing stuff from other PRs. Can you pls merge the latest into staging then into this branch?

dawnkelly09 and others added 3 commits February 23, 2026 11:31
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>
@dawnkelly09 dawnkelly09 requested a review from eshaben February 23, 2026 20:54
@eshaben eshaben merged commit d143c1f into staging-ai-resources-plugin Feb 24, 2026
@eshaben eshaben deleted the adds-per-page-ai-actions branch February 24, 2026 04:23
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