From 5d35f4ee24eba62abdf41fadb02d164c94b543c9 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 20 Jul 2023 07:11:04 +0000 Subject: [PATCH] feat: specify nofollow,noarchive,nocache,noimageindex in addition to noindex (close #37) --- README.md | 1 + packages/backend/src/server/web/views/base.pug | 2 +- packages/backend/src/server/web/views/clip.pug | 2 +- packages/backend/src/server/web/views/gallery-post.pug | 2 +- packages/backend/src/server/web/views/note.pug | 2 +- packages/backend/src/server/web/views/page.pug | 2 +- packages/backend/src/server/web/views/user.pug | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb809b7b0..ab5525d55 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ ## 細かい変更点 +- インデックス拒否に `noindex` に加えて `nofollow,noarchive,nocache,noimageindex` も指定 - インスタンスティッカーに表示するサーバーのアイコンとして favicon を優先する - favicon のほうがよくカスタマイズされているため - 誤爆しやすい位置にあるフォローボタンを隠す設定を追加 diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 7fda4f8a7..cd42d8294 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -55,7 +55,7 @@ html block meta if privateMode - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') block og meta(property='og:title' content=title || 'Firefish') diff --git a/packages/backend/src/server/web/views/clip.pug b/packages/backend/src/server/web/views/clip.pug index 79d629380..47dd0971c 100644 --- a/packages/backend/src/server/web/views/clip.pug +++ b/packages/backend/src/server/web/views/clip.pug @@ -23,7 +23,7 @@ block og block meta unless privateMode if profile.noCrawle - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') if profile.preventAiLearning meta(name='robots' content='noai') meta(name='robots' content='noimageai') diff --git a/packages/backend/src/server/web/views/gallery-post.pug b/packages/backend/src/server/web/views/gallery-post.pug index 561a19b25..050a06d98 100644 --- a/packages/backend/src/server/web/views/gallery-post.pug +++ b/packages/backend/src/server/web/views/gallery-post.pug @@ -23,7 +23,7 @@ block og block meta unless privateMode if user.host || profile.noCrawle - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') if profile.preventAiLearning meta(name='robots' content='noai') meta(name='robots' content='noimageai') diff --git a/packages/backend/src/server/web/views/note.pug b/packages/backend/src/server/web/views/note.pug index dae0a82d5..9cd290216 100644 --- a/packages/backend/src/server/web/views/note.pug +++ b/packages/backend/src/server/web/views/note.pug @@ -35,7 +35,7 @@ block og block meta unless privateMode if user.host || isRenote || profile.noCrawle - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') if profile.preventAiLearning meta(name='robots' content='noai') meta(name='robots' content='noimageai') diff --git a/packages/backend/src/server/web/views/page.pug b/packages/backend/src/server/web/views/page.pug index bfc7ebf79..e466c7976 100644 --- a/packages/backend/src/server/web/views/page.pug +++ b/packages/backend/src/server/web/views/page.pug @@ -23,7 +23,7 @@ block og block meta unless privateMode if profile.noCrawle - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') if profile.preventAiLearning meta(name='robots' content='noai') meta(name='robots' content='noimageai') diff --git a/packages/backend/src/server/web/views/user.pug b/packages/backend/src/server/web/views/user.pug index f5820f55f..d77b39865 100644 --- a/packages/backend/src/server/web/views/user.pug +++ b/packages/backend/src/server/web/views/user.pug @@ -23,7 +23,7 @@ block og block meta unless privateMode if user.host || profile.noCrawle - meta(name='robots' content='noindex') + meta(name='robots' content='noindex,nofollow,noarchive,nocache,noimageindex') if profile.preventAiLearning meta(name='robots' content='noai') meta(name='robots' content='noimageai')