Skip to content

Commit a8f6bba

Browse files
committed
feat: Add configurable search engine indexing behavior [internal]
1 parent 31baff7 commit a8f6bba

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

apify-docs-theme/src/config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ if (process.env.LOCALHOST) {
1010
absoluteUrl = process.env.APIFY_DOCS_ABSOLUTE_URL;
1111
}
1212

13+
let noIndex = false;
14+
if (process.env.NO_INDEX) {
15+
noIndex = [true, 'true', 1, '1'].includes(process.env.NO_INDEX);
16+
}
17+
1318
const themeConfig = {
1419
docs: {
1520
versionPersistence: 'localStorage',
@@ -313,4 +318,5 @@ module.exports = {
313318
themeConfig,
314319
plugins,
315320
absoluteUrl,
321+
noIndex,
316322
};

docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
title: 'Apify Documentation',
1313
tagline: 'Apify Documentation',
1414
url: config.absoluteUrl,
15+
noIndex: config.noIndex,
1516
baseUrl: '/',
1617
trailingSlash: false,
1718
organizationName: 'apify',

0 commit comments

Comments
 (0)