docs: 🔒 robots.txt asset

Closes #10640, #10608
This commit is contained in:
ThatOneCalculator 2023-09-02 11:19:04 -07:00
parent f72c9b818c
commit 86cad1056c
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
3 changed files with 17 additions and 0 deletions

View File

@ -209,6 +209,7 @@ Please don't use ElasticSearch unless you already have an ElasticSearch setup an
- To add custom error images, place them in the `./custom/assets/badges` directory, replacing the files already there. - To add custom error images, place them in the `./custom/assets/badges` directory, replacing the files already there.
- To add custom sounds, place only mp3 files in the `./custom/assets/sounds` directory. - To add custom sounds, place only mp3 files in the `./custom/assets/sounds` directory.
- To update custom assets without rebuilding, just run `pnpm run gulp`. - To update custom assets without rebuilding, just run `pnpm run gulp`.
- To block ChatGPT, CommonCrawl, or other crawlers from indexing your instance, uncomment the respective rules in `./custom/robots.txt`.
## 🧑‍🔬 Configuring a new server ## 🧑‍🔬 Configuring a new server

14
custom/assets/robots.txt Normal file
View File

@ -0,0 +1,14 @@
User-agent: *
Allow: /
# Uncomment the following to block CommonCrawl
#
# User-agent: CCBot
# User-agent: CCBot/2.0
# User-agent: CCBot/3.1
# Disallow: /
# Uncomment the following to block ChatGPT
#
# User-agent: GPTBot
# Disallow: /

View File

@ -24,9 +24,11 @@ block meta
unless privateMode unless privateMode
if profile.noCrawle if profile.noCrawle
meta(name='robots' content='noindex') meta(name='robots' content='noindex')
if profile.preventAiLearning if profile.preventAiLearning
meta(name='robots' content='noai') meta(name='robots' content='noai')
meta(name='robots' content='noimageai') meta(name='robots' content='noimageai')
meta(name='GPTBot' content='noindex')
meta(name='misskey:user-username' content=user.username) meta(name='misskey:user-username' content=user.username)
meta(name='misskey:user-id' content=user.id) meta(name='misskey:user-id' content=user.id)