chore: fix cdn link (#10643)

This commit is contained in:
neverland
2022-05-28 14:49:46 +08:00
committed by GitHub
parent c9b8eb32eb
commit 7beef3b8cc
5 changed files with 14 additions and 9 deletions

View File

@@ -19,10 +19,12 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (htmlWebpackPlugin.options.usingSearch) { %>
<link
href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"
href="https://fastly.jsdelivr.net/docsearch.js/2/docsearch.min.css"
rel="stylesheet"
/>
<% } %>
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
<script>
var _hmt = _hmt || [];
@@ -38,6 +40,8 @@
</head>
<body ontouchstart>
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<% if (htmlWebpackPlugin.options.usingSearch) { %>
<script src="https://fastly.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<% } %>
</body>
</html>

View File

@@ -85,6 +85,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
title,
logo: siteConfig.logo,
description: siteConfig.description,
usingSearch: !!siteConfig.searchConfig,
chunks: ['chunks', 'site-desktop'],
template: join(__dirname, '../../site/desktop/index.html'),
filename: 'index.html',