From de6ebd96c59bd5d94f7290c4bd88c368ed948538 Mon Sep 17 00:00:00 2001 From: Emilien Chauvet Date: Mon, 7 Aug 2023 18:20:31 +0200 Subject: [PATCH] Prevent indexing on docs outside of production (#1054) * Prevent indexing on docs outside of production * Add dockerfile arg * Rename args * Add logs * Move arg to the right dockerfile * Remove log --- docs/docusaurus.config.js | 3 +++ infra/prod/docs/Dockerfile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 2bf7cc380..2f31539a8 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 // pathname under which your site is served diff --git a/infra/prod/docs/Dockerfile b/infra/prod/docs/Dockerfile index 7e02e3e7a..972258f32 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