Skip to content

Commit 45a55cf

Browse files
NightVoyagerclaude
andcommitted
添加 AI 搜索引擎优化支持
- 更新 robots.txt 支持主流 AI 爬虫(ChatGPT、Gemini、Claude、Perplexity 等) - 创建 ai.txt 文件声明 AI 使用政策和许可证 - 在 SEO 模板中添加 AI 友好的元标签 - 声明内容为人类创作,允许非商业 AI 训练和引用 - 要求 AI 引用时提供署名和原文链接 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 755c602 commit 45a55cf

5 files changed

Lines changed: 157 additions & 2 deletions

File tree

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ hasCJKLanguage = true
317317
pinterest = ""
318318
baidu = "codeva-qtdSyvdOSy"
319319
so = "98c9cfe3e0351030f151d7795bfc41a5"
320-
sogou = "6zuMpZ4rSI"
320+
sogou = "2vlWBRmEsH"
321321

322322
# 网站分析配置
323323
[params.analytics]

layouts/partials/head/seo.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@
2222
<meta name="sogou_site_verification" content="{{ . }}" />
2323
{{- end -}}
2424

25+
{{- /* AI 友好标签 */ -}}
26+
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
27+
<meta name="ai-content-declaration" content="human-created">
28+
<meta name="content-language" content="zh-CN">
29+
{{- with .Site.Copyright -}}
30+
<meta name="copyright" content="{{ . }}">
31+
{{- end -}}
32+
{{- with .Site.Params.Author.name -}}
33+
<meta name="author" content="{{ . }}">
34+
{{- end -}}
35+
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }} - RSS Feed" href="{{ "index.xml" | absURL }}">
36+
<link rel="alternate" type="application/json" title="{{ .Site.Title }} - JSON Feed" href="{{ "index.json" | absURL }}">
37+
2538
{{- /* Home SEO */ -}}
2639
{{- if .IsHome -}}
2740
<script type="application/ld+json">

public

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 91158cb26a67c4964d0c33d2aa856ae5267d6cd1
1+
Subproject commit 1b389b59b62ef9aa94616a88984e56797cc57f12

static/ai.txt

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# AI.txt - AI 使用声明
2+
# 参考标准:https://site.spawning.ai/spawning-ai-txt
3+
# 最后更新:2025-11-07
4+
5+
# ===== 联系信息 =====
6+
Contact: 164640966@qq.com
7+
Contact-URL: https://austinxt.github.io
8+
9+
# ===== 许可证信息 =====
10+
License: CC-BY-NC-4.0
11+
License-URL: https://creativecommons.org/licenses/by-nc/4.0/
12+
13+
# ===== AI 使用权限 =====
14+
15+
# 允许 AI 模型训练使用(非商业)
16+
Training: yes
17+
18+
# 允许 AI 生成摘要和引用
19+
Summarization: yes
20+
21+
# 允许在 AI 响应中使用和引用
22+
Generation: yes
23+
24+
# 允许 AI 分析和索引内容
25+
Indexing: yes
26+
27+
# ===== 使用要求 =====
28+
29+
# 要求署名
30+
Attribution: required
31+
Attribution-Name: 夜航星
32+
Attribution-URL: https://austinxt.github.io
33+
34+
# ===== 使用限制 =====
35+
36+
# 不允许的用途
37+
Disallow: commercial-training
38+
Disallow: resale
39+
Disallow: misinformation
40+
Disallow: spam
41+
42+
# ===== 网站信息 =====
43+
44+
# 网站描述
45+
Description: 夜航星的个人博客,分享认知心理学、学习方法、数据分析、编程技术等内容
46+
47+
# 网站语言
48+
Language: zh-CN
49+
50+
# 主要内容类型
51+
Content-Type: blog
52+
Content-Topics: cognitive-psychology, learning-methods, data-analysis, programming, reading-notes
53+
54+
# 优先索引的内容
55+
Priority: /posts/
56+
57+
# 更新频率
58+
Update-Frequency: weekly
59+
60+
# ===== 技术信息 =====
61+
62+
# RSS 订阅
63+
RSS: https://austinxt.github.io/index.xml
64+
65+
# Sitemap
66+
Sitemap: https://austinxt.github.io/sitemap.xml
67+
68+
# ===== 作者信息 =====
69+
Author: 夜航星
70+
Author-Bio: 认知心理学爱好者,专注于学习方法、数据分析和技术写作
71+
Author-URL: https://austinxt.github.io
72+
73+
# ===== 内容政策 =====
74+
75+
# 内容创作方式
76+
Content-Creation: human-created
77+
78+
# 内容质量承诺
79+
Content-Quality: original, researched, cited
80+
81+
# 更新政策
82+
Content-Updates: regular
83+
84+
# ===== 备注 =====
85+
# 本网站欢迎 AI 引擎索引和引用内容
86+
# 要求:
87+
# 1. 保持原文链接和作者署名
88+
# 2. 尊重 CC BY-NC 4.0 许可证
89+
# 3. 不得用于商业训练或转售
90+
# 4. 引用时提供准确的来源信息

static/robots.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,55 @@ Allow: /
3131
# 必应爬虫
3232
User-agent: Bingbot
3333
Allow: /
34+
35+
# ===== AI 搜索引擎爬虫 =====
36+
37+
# OpenAI (ChatGPT)
38+
User-agent: GPTBot
39+
Allow: /
40+
41+
# OpenAI 搜索
42+
User-agent: ChatGPT-User
43+
Allow: /
44+
45+
# Google AI (Bard/Gemini)
46+
User-agent: Google-Extended
47+
Allow: /
48+
49+
# Anthropic (Claude)
50+
User-agent: anthropic-ai
51+
Allow: /
52+
User-agent: Claude-Web
53+
Allow: /
54+
55+
# Perplexity AI
56+
User-agent: PerplexityBot
57+
Allow: /
58+
59+
# Common Crawl (被很多 AI 使用)
60+
User-agent: CCBot
61+
Allow: /
62+
63+
# Meta AI
64+
User-agent: FacebookBot
65+
Allow: /
66+
67+
# Apple Intelligence
68+
User-agent: Applebot-Extended
69+
Allow: /
70+
71+
# 字节跳动 AI
72+
User-agent: Bytespider
73+
Allow: /
74+
75+
# 阿里巴巴 AI
76+
User-agent: AliBot
77+
Allow: /
78+
79+
# 腾讯 AI
80+
User-agent: TencentBot
81+
Allow: /
82+
83+
# Cohere AI
84+
User-agent: cohere-ai
85+
Allow: /

0 commit comments

Comments
 (0)