Skip to content

Conversation

@longsizhuo
Copy link
Member

添加自动化脚本, 当用户提交文档的时候优先把图片放到和MDX同一级

移动到同一级的assets同名目录下, 具体规则:

所有文档放在 docs/ 目录。
图片需要放在 被引用的文档的同名assets目录下(正常情况下您不应该关心这个, 该项目有自动脚本来移动图片), 例如:
docxA 引用了 imgA 图片, 那么他们的文档结构应该是 docxA.assets/imgA:

docsA.mdx
docsA.assets/
imgA

@longsizhuo longsizhuo self-assigned this Sep 13, 2025
@longsizhuo longsizhuo added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 13, 2025
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 adds automation scripts to automatically migrate images to be co-located with their referencing MDX files when users commit documentation, moving them to a same-level assets directory following a specific naming convention.

  • Implements image migration automation for MDX documentation files
  • Adds validation scripts to enforce image naming and location standards
  • Configures pre-commit hooks to automatically run migration and validation

Reviewed Changes

Copilot reviewed 7 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/move-doc-images.mjs Core script that migrates images from /images/ to co-located .assets/ directories and updates references
scripts/check-images.mjs Validation script that checks image paths, naming conventions, and enforces co-location rules
package.json Adds npm scripts for image linting and migration
app/docs/ai/multimodal/llava/index.mdx Example of migrated content with updated image paths and encoding issues
README.md Documents the new image management workflow and rules
CONTRIBUTING.md Updates contribution guidelines with image management information
.husky/pre-commit Configures pre-commit hook to run migration and validation automatically
Comments suppressed due to low confidence (2)

app/docs/ai/multimodal/llava/index.mdx:1

  • The description field contains corrupted Chinese characters. The text should be properly encoded UTF-8 Chinese characters instead of the garbled text shown.
---

app/docs/ai/multimodal/llava/index.mdx:1

  • The Chinese text throughout this file appears to be corrupted with encoding issues. All Chinese characters are displaying as garbled text instead of proper UTF-8 encoded characters.
---

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

longsizhuo and others added 3 commits September 14, 2025 01:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@Crokily Crokily left a comment

Choose a reason for hiding this comment

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

已测试无误,可合并。

@Crokily Crokily merged commit 5428648 into main Sep 14, 2025
1 check passed
@longsizhuo longsizhuo deleted the feat/CICD branch September 17, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants