Skip to content

Release same-origin blog images#53

Merged
wauputr4 merged 2 commits into
releasefrom
main
Jul 23, 2026
Merged

Release same-origin blog images#53
wauputr4 merged 2 commits into
releasefrom
main

Conversation

@wauputr4

Copy link
Copy Markdown
Member

Release

Promote the same-origin blog image and Open Graph metadata changes from main to production.

Included

  • all article thumbnails served from indopensource.org/blog-assets
  • inline Blog-IndopenSource images mirrored to the site domain
  • complete OG image dimensions and MIME types
  • optimized OpenClaw social and body images

Validation

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2c80178-06ea-40a6-bd58-5d914d3225c5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
indopensource-org 79c136c Commit Preview URL

Branch Preview URL
Jul 23 2026, 05:39 PM

@wauputr4
wauputr4 merged commit 5747262 into release Jul 23, 2026
4 checks passed

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

Copy link
Copy Markdown

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 automated review suggestions for this pull request.

Reviewed commit: 79c136ca49

ℹ️ 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}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Emit absolute image URLs in article JSON-LD

Returning root-relative paths here changes post.thumbnail from an absolute raw URL to /blog-assets/...; checked src/components/BlogArticlePage.astro and it still puts thumbnailUrl directly into jsonLd.image, while BaseLayout only normalizes the separate OG/Twitter image prop. For every mirrored article, the emitted BlogPosting JSON-LD therefore contains a relative image URL, which can make structured-data image discovery fail even though the meta tags are correct; normalize the JSON-LD image against the site origin.

Useful? React with 👍 / 👎.

const resolved = resolveThumbnail(value, articlePath, branch);
if (!resolved.startsWith(`https://raw.githubusercontent.com/${BLOG_REPO}/`)) return resolved;

const assetName = new URL(resolved).pathname.split('/').pop()?.replace(/[^A-Za-z0-9._-]/g, '');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve source path in mirrored asset names

Because assetName keeps only the final path segment, two different source assets in the same article month with common names like cover.jpg or image.png are both written to the same public/blog-assets/YYYY/MM/<name> path and then both posts point at that same URL. The later fetch in the sync loop overwrites the earlier file, so one article renders the wrong thumbnail/body image; include the slug/source path or a hash in the mirrored filename.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant