fix: add discoverability headers#131
Conversation
WalkthroughTwo configuration files were added to enhance SEO and crawler discoverability: HTTP Link headers advertising sitemap, RSS feed, llms.txt, and robots.txt resources for agent discovery (RFC 8288/9727); plus a comprehensive robots.txt file declaring the sitemap and defining per-crawler policies with Content-Signal directives. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment Warning |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
static/robots.txt (2)
5-5: Avoid hardcoding the sitemap host.Line 5 hardcodes the production domain, which can drift from
cfg.baseUrlacross preview/staging/custom-domain deployments. Prefer generating this from config (or injecting it at build time) to keep one source of truth.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@static/robots.txt` at line 5, The robots.txt currently hardcodes the sitemap host; instead, update the robots.txt generation to use the canonical base URL from your configuration (e.g., cfg.baseUrl) or inject it at build time so the line becomes "Sitemap: {cfg.baseUrl}/sitemap.xml"; locate where robots.txt is produced (static/robots.txt template or the build/deploy script) and replace the fixed "https://blog.plasticlabs.ai" with a template variable or injected value so preview/staging/custom domains use the correct host.
10-10: Recheck whetherDisallow: /static/is intentional.Line 10 may not affect crawl behavior if your emitted public paths don’t actually live under
/static/. If this is a policy guard, consider pointing it at real emitted paths.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@static/robots.txt` at line 10, Confirm whether the "Disallow: /static/" directive is intentional; if not, remove it or replace it with the actual public asset path(s) your build emits (update the "Disallow: /static/" entry to the correct emitted path(s) or delete it entirely). Locate the line containing the literal "Disallow: /static/" in robots.txt, verify which public paths are served by your app, and update the directive to match those real emitted paths (or remove the directive if no blocking is desired).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@static/robots.txt`:
- Line 5: The robots.txt currently hardcodes the sitemap host; instead, update
the robots.txt generation to use the canonical base URL from your configuration
(e.g., cfg.baseUrl) or inject it at build time so the line becomes "Sitemap:
{cfg.baseUrl}/sitemap.xml"; locate where robots.txt is produced
(static/robots.txt template or the build/deploy script) and replace the fixed
"https://blog.plasticlabs.ai" with a template variable or injected value so
preview/staging/custom domains use the correct host.
- Line 10: Confirm whether the "Disallow: /static/" directive is intentional; if
not, remove it or replace it with the actual public asset path(s) your build
emits (update the "Disallow: /static/" entry to the correct emitted path(s) or
delete it entirely). Locate the line containing the literal "Disallow: /static/"
in robots.txt, verify which public paths are served by your app, and update the
directive to match those real emitted paths (or remove the directive if no
blocking is desired).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c1a2889b-553b-4efe-8709-0587c817a268
📒 Files selected for processing (2)
static/_headersstatic/robots.txt
Summary by CodeRabbit
New Features