Skip to content

The open alternative to Salesforce, designed for AI.

Prevent indexing on docs outside of production (#1054)

Emilien Chauvetde6ebd96c59b
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index 2bf7cc3802b..2f31539a8c7 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -11,6 +11,9 @@ const config = {
tagline: 'Dinosaurs are cool',
favicon: 'img/logo-square-dark.ico',
+ // Prevent search engines from indexing the doc for selected environments
+ noIndex: process.env.SHOULD_INDEX_DOC === 'false',
+
// Set the production url of your site here
url: 'https://docs.twenty.com',
// Set the /<baseUrl>/ pathname under which your site is served
diff --git a/infra/prod/docs/Dockerfile b/infra/prod/docs/Dockerfile
index 7e02e3e7aa2..972258f3252 100644
--- a/infra/prod/docs/Dockerfile
+++ b/infra/prod/docs/Dockerfile
@@ -2,6 +2,8 @@ FROM node:18.16.0-alpine as docs
WORKDIR /app/docs
+ARG SHOULD_INDEX_DOC
+
COPY ./docs/package.json .
COPY ./docs/yarn.lock .
RUN yarn install --prod