mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +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");
|
||||
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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue