From 4e3114872674484188829b3f72cd190bcc042b2d Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Wed, 9 Mar 2016 13:57:54 -0800 Subject: [PATCH] Use a version-specific search Summary:Algolia is now indexing each version of the docs, let's use it :) Closes https://github.com/facebook/react-native/pull/6385 Differential Revision: D3031426 Pulled By: vjeux fb-gh-sync-id: f06855bda304f491aaac28663c2d24b142a80d75 shipit-source-id: f06855bda304f491aaac28663c2d24b142a80d75 --- website/core/Site.js | 10 +++++++++- website/src/react-native/js/scripts.js | 7 ------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/website/core/Site.js b/website/core/Site.js index 19e3eaed058..bacea103bbb 100644 --- a/website/core/Site.js +++ b/website/core/Site.js @@ -17,6 +17,7 @@ var Site = React.createClass({ render: function() { const path = Metadata.config.RN_DEPLOYMENT_PATH; const version = Metadata.config.RN_VERSION; + const algoliaVersion = version === 'next' ? 'master' : version; var basePath = '/react-native/' + (path ? path + '/' : ''); var title = this.props.title ? this.props.title + ' – ' : ''; var currentYear = (new Date()).getFullYear(); @@ -68,6 +69,7 @@ var Site = React.createClass({
+