Adds per-page AI file actions plugin#12
Adds per-page AI file actions plugin#12eshaben merged 14 commits intostaging-ai-resources-pluginfrom
Conversation
There was a problem hiding this comment.
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), andai_page_actions(injects per-page action widgets) - Enhanced
ai_file_utilsshared library with HTML generation capabilities, slug/URL building helpers, and page exclusion logic - Migrated configuration from
categories_orderarray tocategories_infodictionary structure with category metadata - Updated
resolve_mdplugin to use the newcategories_infostructure 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.
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>
…to get copy right
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>
eshaben
left a comment
There was a problem hiding this comment.
I'm still seeing stuff from other PRs. Can you pls merge the latest into staging then into this branch?
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>
This pull request introduces three new AI-focused MkDocs plugins—
ai_resources_page,ai_file_actions, andai_page_actions—along with comprehensive documentation and updates to the sharedai_file_utilslibrary. 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:
ai_resources_page,ai_file_actions, andai_page_actionsplugins, 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):ai_file_utilsto 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.icon,trailingIcon,primary) for richer UI, clarified interpolation variables (includingsite_url), and improved prompt template handling. [1] [2]Configuration and Integration Updates:
categories_infodictionary inllms_config.jsonfor category metadata and display order, replacing the oldcategories_orderarray. [1] [2]ai_file_actions.jsonandllms_config.json. [1] [2] [3]Code Additions:
AiFileActionsPluginclass as a thin MkDocs plugin wrapper that delegates toAIFileUtilsfor 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.