mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 00:57:53 +02:00
Switch Algolia DocSearch to load using https (#252)
* Change docsearch to explicit https
This commit is contained in:
parent
6772926572
commit
df05fd2bbc
1 changed files with 7 additions and 6 deletions
|
@ -32,10 +32,12 @@ class Site extends React.Component {
|
||||||
(this.props.url || "index.html");
|
(this.props.url || "index.html");
|
||||||
let latestVersion;
|
let latestVersion;
|
||||||
|
|
||||||
const highlightDefaultVersion = '9.12.0';
|
const highlightDefaultVersion = "9.12.0";
|
||||||
const highlightConfig = this.props.config.highlight
|
const highlightConfig = this.props.config.highlight || {
|
||||||
|| { version: highlightDefaultVersion, theme: 'default' };
|
version: highlightDefaultVersion,
|
||||||
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
|
theme: "default"
|
||||||
|
};
|
||||||
|
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
|
||||||
if (fs.existsSync(CWD + "/versions.json")) {
|
if (fs.existsSync(CWD + "/versions.json")) {
|
||||||
latestVersion = require(CWD + "/versions.json")[0];
|
latestVersion = require(CWD + "/versions.json")[0];
|
||||||
}
|
}
|
||||||
|
@ -62,7 +64,7 @@ class Site extends React.Component {
|
||||||
{this.props.config.algolia && (
|
{this.props.config.algolia && (
|
||||||
<script
|
<script
|
||||||
type="text/javascript"
|
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 && (
|
{this.props.config.gaTrackingId && (
|
||||||
|
@ -128,7 +130,6 @@ class Site extends React.Component {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue