Skip to content

記事一覧の外部リンクを直接遷移に変更 - #131

Merged
ro80t merged 1 commit into
mainfrom
feat-direct-article-links
Aug 21, 2026
Merged

記事一覧の外部リンクを直接遷移に変更#131
ro80t merged 1 commit into
mainfrom
feat-direct-article-links

Conversation

@ro80t

@ro80t ro80t commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • 記事一覧(トップページ・/articles)のリンク先を、外部URL(data.url)を持つ記事はそのURLへ直接遷移するように変更
  • 従来は内部の /articles/{id} ページを一度読み込んでからJSでリダイレクトしていたが、その中間ステップをスキップ
  • /articles/[...slug].astro の内部ページ生成・リダイレクトスクリプトはそのまま維持(pagefindのインデックス対象・検索結果からのフォールバックとして機能)

Test plan

  • npm run lint
  • npm run build(pagefindインデックス生成含む)
  • ビルド後のHTMLで、外部URLを持つ記事のリンクが直接そのURLを指していることを確認
  • 外部URLを持たない記事は従来通り /articles/{id} にリンクされることを確認

🤖 Generated with Claude Code

Article list links now point straight to an article's external url
(when set) instead of loading the internal /articles/{id} page first
and redirecting via client-side JS. The internal page is still built
so pagefind can index it and it still serves as a fallback redirect.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Preview deployed to: https://wktk.moe/pr-preview-131/

@ro80t
ro80t merged commit 9359405 into main Aug 21, 2026
5 checks passed
@ro80t
ro80t deleted the feat-direct-article-links branch August 21, 2026 08:47
github-actions Bot added a commit that referenced this pull request Aug 21, 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.

1 participant