Repository navigation
feat: 検索エンジン向けに sitemap.xml と robots.txt を返す - #180
Merged
Merged
Conversation
未ログインで見られる / ・/login・/signup を sitemap に載せ、 API とログイン必須のパスは robots.txt で除外する。 公開単語帳(/share)はリンクを知る人向けの共有なので載せない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Google などのクローラ向けに
/sitemap.xmlと/robots.txtを返すリソースルートを追加しました。/sitemap.xml: 未ログインで閲覧できる/・/login・/signupを載せる/robots.txt:/api/・/history・/learn・/my-notebooks・/invite/を Disallow にし、sitemap の場所をSitemap:行で示すBETTER_AUTH_URLを使うapp/lib/shared/sitemap.tsの純粋関数にし、単体テストを追加載せていないもの
/learn以下: ログイン必須でクローラが読めないため/share/:id: 「リンクを知っている人向け」の共有なので、検索結果に出さないデプロイ後
Google Search Console で
https://<本番ドメイン>/sitemap.xmlを送信する。確認
npm run lint/npm run typecheck/npm testが通ることを確認🤖 Generated with Claude Code