Switch Algolia DocSearch to load using https (#252)

* Change docsearch to explicit https
This commit is contained in:
Héctor Ramos 2017-12-04 09:26:44 -08:00 committed by Joel Marcey
parent 6772926572
commit df05fd2bbc

View file

@ -32,10 +32,12 @@ class Site extends React.Component {
(this.props.url || "index.html");
let latestVersion;
const highlightDefaultVersion = '9.12.0';
const highlightConfig = this.props.config.highlight
|| { version: highlightDefaultVersion, theme: 'default' };
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
const highlightDefaultVersion = "9.12.0";
const highlightConfig = this.props.config.highlight || {
version: highlightDefaultVersion,
theme: "default"
};
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
if (fs.existsSync(CWD + "/versions.json")) {
latestVersion = require(CWD + "/versions.json")[0];
}
@ -62,7 +64,7 @@ class Site extends React.Component {
{this.props.config.algolia && (
<script
type="text/javascript"
src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"
src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"
/>
)}
{this.props.config.gaTrackingId && (
@ -128,7 +130,6 @@ class Site extends React.Component {
}}
/>
))}
</body>
</html>
);