-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(content): reorganize blog mdx to page bundles and structure … #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideRefactors blog content to use directory-based page bundles and a structured public image hierarchy, updates all affected image paths, and adds internal documentation for the refactor, while also pointing homepage/about images to the new locations and making minor formatting adjustments. Flow diagram for the refactoring process described in agents.mdflowchart TD
A_start["Start refactor"] --> B_phase1
subgraph Phase_1_Reorganize_MDX
B_phase1["Phase 1: Reorganize MDX files"] --> B1_list_files["List all src/content/blog/*.mdx"]
B1_list_files --> B2_for_each_file["For each MDX file"]
B2_for_each_file --> B3_create_dir["Create folder src/content/blog/[slug]/"]
B3_create_dir --> B4_git_mv_mdx["git mv file to src/content/blog/[slug]/index.mdx"]
end
B4_git_mv_mdx --> C_phase2
subgraph Phase_2_Reorganize_Images
C_phase2["Phase 2: Reorganize public images"] --> C1_create_structure["Ensure public/images/blog and public/images/common exist"]
C1_create_structure --> C2_identify_images["Identify images for each blog post"]
C2_identify_images --> C3_move_post_images["git mv post specific images to public/images/blog/[slug]/"]
C2_identify_images --> C4_move_common_images["git mv shared images to public/images/common/"]
end
C3_move_post_images --> D_phase3
C4_move_common_images --> D_phase3
subgraph Phase_3_Update_References
D_phase3["Phase 3: Update references in MDX"] --> D1_update_heroImage["Update frontmatter heroImage paths"]
D1_update_heroImage --> D2_update_markdown_images["Update markdown image links"]
D2_update_markdown_images --> D3_update_astro_image["Update Astro Image component src attributes"]
end
D3_update_astro_image --> E_phase4
subgraph Phase_4_Verification
E_phase4["Phase 4: Verification"] --> E1_run_checks["Run npm run lint or npm run build"]
E1_run_checks --> E2_fix_issues{"Broken paths?"}
E2_fix_issues -->|Yes| D_phase3
E2_fix_issues -->|No| F_done["Refactor complete"]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughThis PR reorganizes asset paths across an Astro blog project from legacy locations ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (19)
📒 Files selected for processing (18)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (22)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `agents.md:24` </location>
<code_context>
+ - Example: `src/content/blog/my-article.mdx` -> `src/content/blog/my-article/`
+2. Move the `.mdx` file into that directory and rename it to `index.mdx`.
+ - Result: `src/content/blog/my-article/index.mdx`
+3. **Important:** Use `git mv` command if possible to preserve file history.
+
+### Phase 2: Reorganize Public Images
</code_context>
<issue_to_address>
**suggestion (typo):** Consider adding an article: "Use the `git mv` command" for smoother grammar.
Update the sentence to: "Use the `git mv` command if possible to preserve file history." for clearer grammar.
```suggestion
3. **Important:** Use the `git mv` command if possible to preserve file history.
```
</issue_to_address>
### Comment 2
<location> `agents.md:64` </location>
<code_context>
+
+## Execution Order
+
+Please perform Phase 1 first. Once confirmed, proceed to Phase 2 and 3 together.
</code_context>
<issue_to_address>
**suggestion (typo):** Use "Phases 2 and 3" instead of "Phase 2 and 3" for correct plural agreement.
Suggested wording: "Once confirmed, proceed to Phases 2 and 3 together."
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
agents.md
Outdated
| - Example: `src/content/blog/my-article.mdx` -> `src/content/blog/my-article/` | ||
| 2. Move the `.mdx` file into that directory and rename it to `index.mdx`. | ||
| - Result: `src/content/blog/my-article/index.mdx` | ||
| 3. **Important:** Use `git mv` command if possible to preserve file history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (typo): Consider adding an article: "Use the git mv command" for smoother grammar.
Update the sentence to: "Use the git mv command if possible to preserve file history." for clearer grammar.
| 3. **Important:** Use `git mv` command if possible to preserve file history. | |
| 3. **Important:** Use the `git mv` command if possible to preserve file history. |
agents.md
Outdated
|
|
||
| ## Execution Order | ||
|
|
||
| Please perform Phase 1 first. Once confirmed, proceed to Phase 2 and 3 together. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (typo): Use "Phases 2 and 3" instead of "Phase 2 and 3" for correct plural agreement.
Suggested wording: "Once confirmed, proceed to Phases 2 and 3 together."
## [1.2.1](v1.2.0...v1.2.1) (2025-12-30) ### ♻️ Refactoring * **content:** reorganize blog mdx to page bundles and structure … ([#5](#5)) ([377e19d](377e19d))
|
🎉 This PR is included in version 1.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…public images
Summary by Sourcery
Reorganize blog content and public assets into a structured page-bundle layout and centralized image hierarchy, updating pages and posts to reference the new image locations.
Enhancements:
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.