From 98580ffe719eeb744a50d0e9d83243892b44a717 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Tue, 19 Nov 2019 07:04:40 -0800 Subject: [PATCH] adding search to docs (#8906) --- website/script/fix-path.js | 7 +++++++ website/siteConfig.js | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/website/script/fix-path.js b/website/script/fix-path.js index af239e8ee4e..2f27cba2a68 100644 --- a/website/script/fix-path.js +++ b/website/script/fix-path.js @@ -60,6 +60,13 @@ try { return match + ``; }, }); + replace.sync({ + files: './build/ApacheDruid/docs/**/*.html', + from: /"version:druidVersion"/g, + to: (match, fullText) => { + return `"version:${druidVersion}"`; + }, + }); console.log('Fixed versions'); diff --git a/website/siteConfig.js b/website/siteConfig.js index 62345b6963f..361b603b12d 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -102,6 +102,17 @@ const siteConfig = { editUrl: 'https://github.com/apache/incubator-druid/edit/master/docs/', + algolia: { + apiKey: '2de99082a9f38e49dfaa059bbe4c901d', + indexName: 'apache_druid', + algoliaOptions: { + facetFilters: [ + "language:LANGUAGE", + "version:druidVersion", + ] + }, + }, + // Show documentation's last contributor's name. // enableUpdateBy: true,