Update Head.tsx

This commit is contained in:
enneaa 2025-03-13 03:44:06 +08:00 committed by GitHub
parent 510a01ae92
commit 268cae99d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,7 +139,7 @@ export default (() => {
const ogImageDefaultPath = `https://${cfg.baseUrl}/static/og-image.png`
// "static/social-images/slug-filename.md.webp"
const ogImageGeneratedPath = `https://${cfg.baseUrl}/${fileDir.replace(
const ogImageGeneratedPath = `https://${cfg.baseUrl}/${fileDir.replace( 
`${ctx.argv.output}/`,
"",
)}/${fileName}.${extension}`
@ -172,7 +172,13 @@ export default (() => {
<head>
<title>{title}</title>
<meta charSet="utf-8" />
{cfg.theme.cdnCaching && cfg.theme.fontOrigin === "googleFonts" && (
{cfg.theme.cdnCaching && ( 
<>
<link rel="preconnect" href="https://cdn.jsdelivr.net" /> 
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-lite-webfont@1.1.0/style.css" />  
</>
)}
{cfg.theme.cdnCaching && cfg.theme.fontOrigin === "googleFonts" && ( 
<>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />