User-agent: *
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
Allow: /
{{- else }}
Disallow: /
{{- end }}
Disallow: /admin/
Disallow: /private/

User-agent: AdsBot-Google
Allow: /

User-agent: Googlebot
Allow: /

User-agent: Bingbot
Allow: /

User-agent: Twitterbot
Allow: /

User-agent: facebookexternalhit
Allow: /

User-agent: LinkedInBot
Allow: /

# AI / answer-engine crawlers — explicitly welcome (GEO):
# being citable by AI assistants is a distribution channel for this blog.
User-agent: GPTBot
Allow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: ClaudeBot
Allow: /

User-agent: Claude-Web
Allow: /

User-agent: anthropic-ai
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: Perplexity-User
Allow: /

User-agent: Google-Extended
Allow: /

User-agent: Applebot-Extended
Allow: /

User-agent: cohere-ai
Allow: /

User-agent: DuckAssistBot
Allow: /

User-agent: MistralAI-User
Allow: /

User-agent: YouBot
Allow: /

User-agent: Amazonbot
Allow: /

User-agent: Meta-ExternalAgent
Allow: /

User-agent: Meta-ExternalFetcher
Allow: /

User-agent: DataForSeoBot
Allow: /

# China AI / search crawlers — Baidu (Wenxin), Sogou (WeChat search),
# Shenma (UC/Alibaba), ByteDance (Doubao / Toutiao / Douyin search).
# Same rationale: being cited by domestic AI answer engines is a
# distribution channel worth encouraging.
User-agent: Baiduspider
Allow: /

User-agent: Baiduspider-render
Allow: /

User-agent: Sogou web spider
Allow: /

User-agent: YisouSpider
Allow: /

User-agent: Bytespider
Allow: /

User-agent: DoubaoSpider
Allow: /

# All four sitemaps are generated by our custom Hugo templates — canonical
# trailing-slash URLs, hreflang across en/zh, no /404 or verify-file leaks.
# The root sitemap is a sitemapindex pointing at the per-language ones.
Sitemap: {{ "sitemap.xml" | absURL }}
Sitemap: {{ "en/sitemap.xml" | absURL }}
Sitemap: {{ "zh/sitemap.xml" | absURL }}
Sitemap: {{ "news-sitemap.xml" | absURL }}
