feat: add support for robots.txt disabling search indexing (#2929)

* feat: add support for robots.txt

Can toggle disabling search engine indexing. Closes #2684

* fix: unexport ts const
This commit is contained in:
Gabe Kangas
2023-05-30 11:09:51 -07:00
committed by GitHub
parent d5fd76d796
commit 15dc718e61
10 changed files with 122 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ const API_HIDE_VIEWER_COUNT = '/hideviewercount';
const API_CHAT_DISABLE = '/chat/disable';
const API_CHAT_JOIN_MESSAGES_ENABLED = '/chat/joinmessagesenabled';
const API_CHAT_ESTABLISHED_MODE = '/chat/establishedusermode';
const API_DISABLE_SEARCH_INDEXING = '/disablesearchindexing';
const API_SOCKET_HOST_OVERRIDE = '/sockethostoverride';
// Federation
@@ -212,6 +212,13 @@ export const FIELD_PROPS_HIDE_VIEWER_COUNT = {
tip: 'Turn this ON to hide the viewer count on the web page.',
};
export const FIELD_PROPS_DISABLE_SEARCH_INDEXING = {
apiPath: API_DISABLE_SEARCH_INDEXING,
configPath: '',
label: 'Disable search engine indexing',
tip: 'Turn this ON to to tell search engines not to index this site.',
};
export const DEFAULT_VARIANT_STATE: VideoVariant = {
framerate: 24,
videoPassthrough: false,

View File

@@ -71,6 +71,7 @@ const initialServerConfigState: ConfigDetails = {
chatJoinMessagesEnabled: true,
chatEstablishedUserMode: false,
hideViewerCount: false,
disableSearchIndexing: false,
};
const initialServerStatusState = {