Skip to content

WORKごとに個別OGPを設定できるように改善#62

Merged
tutinoko2048 merged 12 commits intodevfrom
feat/works-ogp-support
Apr 8, 2026
Merged

WORKごとに個別OGPを設定できるように改善#62
tutinoko2048 merged 12 commits intodevfrom
feat/works-ogp-support

Conversation

@tutinoko2048
Copy link
Copy Markdown
Member

  • 既存のWORKへの個別リンクはquery指定なだけだから個別にmetaタグを設定できない
  • paramとしてgetStaticPathsを使って事前に/works/[slug]のようなページを生成しておく
  • アクセスがあったらメインページにquery付きでリダイレクトして、従来通りModalを開かせる

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 7, 2026

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
studio 6645112 Commit Preview URL

Branch Preview URL
Apr 07 2026, 05:22 PM

Copy link
Copy Markdown
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

WORKごとにユニークなURL(/works/[slug])を用意し、そのページで個別のOGP/metaを出しつつ、実際の表示は従来どおりトップ(/?work=...)へリダイレクトしてModalを開く導線を実現するPRです。

Changes:

  • WORK一覧に slug を付与できるようにし、slug⇄work の参照をユーティリティ側で整備
  • /works/[work] の静的ページを追加し、個別OGPを生成した上でトップへリダイレクト
  • Layoutにページごとの meta 上書き(title/description/thumbnail/canonical)を追加

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils/work.ts work slug の生成・参照、queryWorks() の返却へ slug 付与、getWorkSlug() の挙動変更
src/pages/works/[work].astro 個別OGP用の静的ページ生成+トップページへリダイレクト
src/layouts/Layout.astro meta上書き用の meta props を追加し、head内の一部metaを差し替え可能に
src/components/works/WorkModal.svelte 「リンクをコピー」を /works/[slug] に変更
scripts/collect-licenses.ts license text 取得失敗時にスキップできるように改善+許容ライセンス追加
package.json wrangler のバージョン更新(依存区分変更含む)
pnpm-lock.yaml 依存更新のロック反映
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/layouts/Layout.astro
Comment thread src/pages/works/[work].astro Outdated
Comment thread src/pages/works/[work].astro
Comment thread src/components/works/WorkModal.svelte Outdated
Comment thread package.json
@tutinoko2048 tutinoko2048 requested a review from Rinrin0413 April 7, 2026 17:21
@tutinoko2048 tutinoko2048 merged commit 4ff5079 into dev Apr 8, 2026
3 checks passed
@tutinoko2048 tutinoko2048 mentioned this pull request Apr 12, 2026
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.

3 participants