Serve blog images from the site domain#52
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
indopensource-org | 01d9e2e | Commit Preview URL Branch Preview URL |
Jul 23 2026, 05:37 PM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01d9e2ee63
ℹ️ 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
- 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 address that feedback".
|
|
||
| await mkdir(assetDirectory, { recursive: true }); | ||
| await writeFile(new URL(assetName, assetDirectory), Buffer.from(await response.arrayBuffer())); | ||
| return `/blog-assets/${year}/${month}/${assetName}`; |
There was a problem hiding this comment.
Respect ASTRO_BASE for mirrored body images
When the site is built with a non-root base path, such as the CI build's ASTRO_BASE=/indopensource.org, this root-relative URL is inserted verbatim into article content by mirrorContentAssets; that HTML is later emitted through set:html, so unlike hero thumbnails it never passes through withBase. Inline blog images therefore request /blog-assets/... from the domain root instead of /<base>/blog-assets/... and break on sub-path previews/forks. Store a base-aware URL or rewrite body image src values during render.
Useful? React with 👍 / 👎.
What changed
/blog-assetsduring syncRoot cause
Article images were rendered from
raw.githubusercontent.com. Social crawlers and browsers could fail or cache that external response, leaving a blank hero and an unreliable OG preview.Impact
All blog images now load from
indopensource.org; the OpenClaw OG image is 1200x630 (~160 KB), and its inline image is reduced from 6.3 MB to ~372 KB.Validation
npm test(23 tests passed)npm run build(113 pages, no diagnostics)