AI file actions plugins: per page widget and AI resources page#13
Open
dawnkelly09 wants to merge 55 commits intomainfrom
Open
AI file actions plugins: per page widget and AI resources page#13dawnkelly09 wants to merge 55 commits intomainfrom
dawnkelly09 wants to merge 55 commits intomainfrom
Conversation
Co-authored-by: Erin Shaben <eshaben@icloud.com>
Create ai file utils data model and helper script
Co-authored-by: Erin Shaben <eshaben@icloud.com>
Adds AI Resources Page plugin
Creates AI Resource Page plugin
…o adds-per-page-ai-actions
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>
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>
Adds per-page AI file actions plugin
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>
Contributor
There was a problem hiding this comment.
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_pageplugin to automatically generate an AI Resources index page with a table of LLM-optimized artifact files - Added
ai_page_actionsplugin to inject per-page AI action widgets next to H1 headings at build time - Introduced shared
ai_file_utilslibrary for centralized action resolution and HTML generation with JSON-driven configuration - Migrated
resolve_mdplugin fromcategories_order(array) tocategories_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.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
ai_resources_pageplugin to automate generation of an "AI Resources" page with a dynamic table of artifact files.ai_page_actionsplugin, which injects a per-page AI actions widget next to each page's H1 heading at build time.ai_file_actions(convenience wrapper for dropdown generation) andai_file_utils(centralized action resolution and HTML generation for AI file actions). [1] [2] [3]Documentation Updates:
README.mdto describe the new plugins and libraries, including their purpose and links to detailed docs.README.mdto show how to enable the new plugins inmkdocs.yml.ai-page-actions,ai-resources-page,ai-file-actions, andai-file-utils, detailing their usage, configuration, and integration. [1] [2] [3] [4]Configuration Improvements:
CONTRIBUTING.mdto include the newhelper_lib/directory in formatting and linting instructions.llms_config.jsonschema references in documentation to usecategories_info(dictionary with metadata and display order) instead ofcategories_order(array), improving clarity and flexibility for category management. [1] [2]Plugin Integration and Usage:
AI Action Model and Customization:
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.