-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add static robots.txt file #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| User-agent: * | ||
|
|
||
| Sitemap: https://www.furrycons.cn/sitemap/index.xml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: git ls-files | head -20Repository: FurryConsChina/website Length of output: 464 🏁 Script executed: # Find key config and deployment files
fd -e yml -e yaml -e json -e sh | grep -E "(github|gitlab|jenkins|ci|cd|deploy|build)" | head -20Repository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Check for robots.txt related files and configs
fd "robots" --type fRepository: FurryConsChina/website Length of output: 83 🏁 Script executed: # Look for environment variable configurations and overrides
fd -e env -e config | head -20Repository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Read the current robots.txt content
cat public/robots.txtRepository: FurryConsChina/website Length of output: 132 🏁 Script executed: # Check deployment workflow for production
cat .github/workflows/deploy-prod-cn.ymlRepository: FurryConsChina/website Length of output: 1723 🏁 Script executed: # List all GitHub workflows to see if there are staging/preview deployments
ls -la .github/workflows/Repository: FurryConsChina/website Length of output: 526 🏁 Script executed: # Check .env.example for environment variables
cat .env.exampleRepository: FurryConsChina/website Length of output: 257 🏁 Script executed: # Search for any robots-related typescript/javascript files
find . -name "*robots*" -type fRepository: FurryConsChina/website Length of output: 85 🏁 Script executed: # Search for NEXT_PUBLIC_WEBSITE_URL usage
rg "NEXT_PUBLIC_WEBSITE_URL" -A 2 -B 2Repository: FurryConsChina/website Length of output: 231 🏁 Script executed: # Search for any typescript/javascript robots files in src directory
find src -name "*robots*" -type f 2>/dev/nullRepository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Check next.config.js for robots.txt handling
cat next.config.jsRepository: FurryConsChina/website Length of output: 3630 🏁 Script executed: # Check Dockerfile for environment-specific handling
cat DockerfileRepository: FurryConsChina/website Length of output: 2441 🏁 Script executed: # Search for staging, preview, or dev deployment configurations
rg -i "staging|preview|dev" --glob "*.yml" --glob "*.yaml" --glob "*.json" -A 2 -B 2Repository: FurryConsChina/website Length of output: 2500 🏁 Script executed: # Check if there are environment-specific public directory or build steps
rg -rn "public/robots" -A 2 -B 2Repository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Search for any robots-related environment overrides
rg -rn "robots\.txt" -A 3 -B 3Repository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Search more broadly for any staging/preview/dev references
rg -i "(staging|preview|dev|development)" . --type-list | head -30Repository: FurryConsChina/website Length of output: 455 🏁 Script executed: # Check README for deployment information
cat README.md | grep -i -A 5 -B 5 "deploy\|staging\|preview"Repository: FurryConsChina/website Length of output: 1322 🏁 Script executed: # Check if there are any build scripts or deployment scripts
find . -name "*.sh" -o -name "Makefile" | head -20Repository: FurryConsChina/website Length of output: 48 🏁 Script executed: # Search for any references to multiple environments or domain configurations
rg "furrycons\.cn" -A 2 -B 2Repository: FurryConsChina/website Length of output: 6175 🏁 Script executed: # Check for any conditional environment handling in next.config.js or build process
rg "process\.env\." next.config.jsRepository: FurryConsChina/website Length of output: 135 Sitemap URL 硬编码生产域名,非生产环境面临索引风险 robots.txt 已是静态文件,Sitemap 地址被固定为 存在的风险:
建议:
🤖 Prompt for AI Agents |
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new static robots file hardcodes
https://www.furrycons.cn/sitemap/index.xml, which regresses the previous host-aware behavior for any deployment where the hostname is notwww.furrycons.cn(for example staging or self-hosted mirrors). The codebase still supports configurable public hosts viaNEXT_PUBLIC_WEBSITE_URL(seesrc/utils/env.tsand URL/canonical helpers), so this fixed value can cause crawlers to fetch the wrong sitemap and miss the current deployment’s URLs.Useful? React with 👍 / 👎.