Skip to content

feat: add sponsored article support - #315

Merged
Arata1202 merged 8 commits into
masterfrom
feat/sponsored-articles
Aug 1, 2026
Merged

feat: add sponsored article support#315
Arata1202 merged 8 commits into
masterfrom
feat/sponsored-articles

Conversation

@Arata1202

Copy link
Copy Markdown
Owner

概要

microCMSの記事をスポンサー記事として明示し、広告主に関連するリンクへ適切なリンク属性を付与できるようにします。

変更内容

  • isSponsoredsponsorNamesponsorUrlを記事型へ追加
  • 一覧カードと記事タイトル付近にPRバッジを表示
  • 記事本文より前に広告主名を含む開示文を表示
  • 広告主と同一ドメインまたはサブドメインのリンクへrel="sponsored"を付与
  • 既存のrel値と無関係な外部リンクを維持
  • スポンサー名または有効なURLが欠けたスポンサー記事のビルドを停止
  • microCMSの設定方法をREADMEへ追加
  • ユニットテストとPC・モバイル向けE2Eテストを追加

microCMS設定

blog APIへ次のフィールドを追加してください。

  • isSponsored: 真偽値、初期値false
  • sponsorName: テキスト
  • sponsorUrl: URL

検証

  • pnpm lint
  • pnpm typecheck
  • pnpm test:run(221件成功)
  • pnpm build:e2e
  • pnpm test:e2e(PC・モバイル計38件成功)

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
api-next-blog-app Ignored Ignored Aug 1, 2026 4:17am

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying next-blog-app with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e9d49a
Status: ✅  Deploy successful!
Preview URL: https://4c1685cb.next-blog-app-8ai.pages.dev
Branch Preview URL: https://feat-sponsored-articles.next-blog-app-8ai.pages.dev

View logs

@Arata1202
Arata1202 merged commit 3c38354 into master Aug 1, 2026
10 checks passed
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