Conversation
…ine API support - Enhanced the Makefile to include detailed environment variable instructions for Volcengine, ModelScope, and OpenAI. - Updated the AI cover generation script to check for Volcengine API keys and provide clearer warnings for missing configurations. - Improved user guidance for setting up necessary API keys, ensuring a smoother experience for users integrating with the Volcengine service.
…ation - Introduced a new documentation file for the AI cover generation feature, detailing its capabilities and advantages. - Updated the image generation configuration to support higher resolution outputs (2560x1440). - Enhanced the prompt optimization logic to better tailor visual elements based on keywords in the title and description. - Improved error handling for API responses, including specific logging for access denial issues. - Added functionality to clean up existing cover configurations in front matter before adding new AI-generated cover information. - Included new generated cover images in the static directory.
- Created a new markdown file for the book "AI原生范式:重构软件与创造力" with detailed sections and topics. - Updated docker-compose.yml to include additional resource and public directories. - Modified list.html to streamline page handling in the template. - Refactored cover-image.html to enhance cover image generation with dynamic styles. - Added fix_markdown_refs.py script to process markdown references and superscripts. - Introduced link_references.py script to create links for references in the markdown file.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the AI cover generation workflow by switching to Volcengine Jimeng as the default AI image provider and improving the visual presentation of AI-generated covers through CSS enhancements.
Key Changes
- Default AI Provider Switch: Changed from ModelScope to Volcengine Jimeng (即梦) as the default image generation service, with updated API integration including proper datetime handling and error messages
- Visual Enhancements: Migrated inline styles from templates to a centralized CSS file (
custom.css) with category-specific gradient backgrounds and responsive design for AI-generated covers - Workflow Improvements: Enhanced the cover generation script to support both file and directory processing, improved front matter cleanup logic, and updated environment variable configuration guidance in the Makefile
Reviewed Changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/link_references.py | New utility script for processing markdown references (contains hardcoded path issue) |
| scripts/fix_markdown_refs.py | New utility script for fixing markdown reference formatting (contains hardcoded path issue) |
| scripts/ai_cover_generator.py | Updated to use Volcengine Jimeng API with improved datetime handling, Chinese prompts, error handling, and directory support |
| layouts/partials/cover-image.html | Refactored to remove inline styles and use CSS classes with dynamic category-based styling |
| assets/css/custom.css | Added comprehensive AI-generated cover styles with gradients, animations, and category-specific themes |
| docker-compose.yml | Optimized by adding volume exclusions and removing performance-impacting flags |
| config.toml | Added ignore files configuration to improve build performance |
| Makefile | Updated help documentation to reflect Volcengine as default provider with clearer configuration examples |
| content/zh/glm/glm.md | Front matter syntax error in opening delimiter |
| content/zh/imo/imo_2025_gemini_2.5pro.md | Updated category metadata |
| cache/image-generation/generation_cache.json | Added cache entries with hardcoded absolute paths |
| docs/*.md | New API documentation files for Jimeng integration (one contains incomplete error message) |
| layouts/_default/list.html | Simplified page collection logic by removing unnecessary union operations |
| books/ai_native/0.md | New book outline document |
| content/en/gemini_3.html | New HTML demonstration page |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…cache Co-authored-by: hobbytp <4393477+hobbytp@users.noreply.github.com>
Co-authored-by: hobbytp <4393477+hobbytp@users.noreply.github.com>
Fix hardcoded absolute paths in image generation cache
fix: Replace hardcoded Windows path with ISO timestamp in generation cache
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.
本次拉取请求更新了AI封面生成工作流,并提升了AI生成封面的视觉效果。主要变更包括:将火山引擎计梦设为默认AI图像提供商,更新环境变量配置说明,并为AI生成封面新增了分类渐变色CSS样式。
AI封面生成工作流改进:
Makefile中修订了火山引擎、ModelScope和OpenAI的环境变量配置说明generate-ai-covers和generate-covers-for-directory目标中API密钥检查逻辑,改进了错误提示信息,并为所有支持的服务商提供了更清晰的配置指引AI生成封面视觉增强:
assets/css/custom.css中新增.ai-generated-coverCSS样式,包含响应式布局、渐变背景(浅色/深色)、动态遮罩效果,以及封面文字的优化排版样式