Skip to content

SWF(refactor): 本番サイト URL の定義を astro.config.mjs の site に一本化 - #815

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145897-site-url-single-source
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145897-site-url-single-source

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

本番サイトの URL を astro.config.mjs の site だけで定義し、src/config.json の url と public/robots.txt に重複していた https://sur33.com をなくしました。ビルド結果の dist/ は変わりません。

  • BaseLayout.astro: og:image を new URL(ogimage || config.ogImage, Astro.site ?? Astro.url.origin) で組み立てます。Astro.site が無いのは Container API で描画するときだけなので、そのときはリクエストの origin を使います。
  • rss.xml.ts: config.url を import.meta.env.SITE に置き換えました。
  • public/robots.txt → src/pages/robots.txt.ts: Astro ドキュメントの方法に沿って、site から Sitemap の URL を作るエンドポイントにしました。
  • tests/e2e/specs/rss.spec.ts: 期待値の本番 URL を config.url から読まず、テスト内に直接書くようにしました。

確認

main とこのブランチで pnpm run build:ci を実行し、dist/ を比べました。

ネットワークをスタブしたビルド同士の dist diff: exit 0, 0 行
og:image タグ: 48 個の HTML で同一
robots.txt / sitemap-index.xml / sitemap-0.xml: バイト単位で同一
RSS のチャンネルと item の URL: 18 件同一

スタブなしのビルドでは 8 行の差分が出ました。どれもビルド時に取得するリンクカードの画像とマークアップの差分で、この変更とは関係ありません。

pnpm run lint: 0 errors, 0 warnings
Vitest: 7 files, 132 tests passed
Playwright (metadata/sitemap/rss, chromium): 19 passed

試すコマンド: pnpm run build:ci && cat dist/robots.txt

画面での確認は、このあと QA Engineer に依頼します。


Software Factory opened this PR for Daiki
Implemented in session Define production site URL in one place
Review with Devin · Open in Devin Desktop


Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53ebfb84-de12-4429-a1dc-5e39784f3e8d

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 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
blog 46d99bb Commit Preview URL

Branch Preview URL
Nov 20 2026, 03:45 AM

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

QA: production URL parity — PASS

Compared this PR (46d99bb) against its merge-base with main (e693614).

Check Result
/robots.txt (dist + local Worker + Workers preview) Identical body; Sitemap: https://sur33.com/sitemap-index.xml, text/plain
sitemap-index.xml, sitemap-0.xml Byte-identical
canonical / og:url / og:image in all 48 HTML pages Identical, all https://sur33.com/...
RSS links and image src Same https://sur33.com origin (remaining diffs are link-card OGP fetch flakes only)

Note: articles have no <link rel="canonical"> on main either (only the /posts/ redirect page has one), so there is no article canonical URL to compare. CI E2E was still running when this was posted.

Side-by-side browser check (left = main, right = PR):

Article OG URL and image parity

Browser QA recording

Chaptered recording

Written by Devin

This branch has not been deployed

No deployments
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.

0 participants