Skip to content

Commit

Permalink
添加 robots.txt 文件以管理搜索引擎爬虫访问权限
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoWendell committed Nov 22, 2024
1 parent 6ed84a8 commit 4696eec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
permalink: /robots.txt
# The robots rules
---

User-agent: *

# Disallow certain paths
Disallow: /assets/ # 阻止访问静态文件

# Disallow Googlebot-Image from crawling images
User-agent: Googlebot-Image
Disallow: /img/ # 不允许爬虫访问图片目录

# Allow all crawlers to index the main content
Allow: / # 允许爬虫访问主页和其他页面

# Sitemap location
Sitemap: {{ '/sitemap.xml' | absolute_url }}

0 comments on commit 4696eec

Please sign in to comment.