fix: build fails without css chunks (#209) (#239)

Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
pull/284/head
Domantas 4 years ago committed by GitHub
parent d1a62e1c66
commit fa469fd275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,6 +53,10 @@ export async function renderPage(
}) })
.join('\n ') .join('\n ')
const stylesheetLink = cssChunk
? `<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}">`
: ''
const html = ` const html = `
<!DOCTYPE html> <!DOCTYPE html>
<html lang="${siteData.lang}"> <html lang="${siteData.lang}">
@ -65,7 +69,7 @@ export async function renderPage(
<meta name="description" content="${ <meta name="description" content="${
pageData.description || siteData.description pageData.description || siteData.description
}"> }">
<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}"> ${stylesheetLink}
${preloadLinks} ${preloadLinks}
${renderHead(siteData.head)} ${renderHead(siteData.head)}
${renderHead(frontmatterHead && filterOutHeadDescription(frontmatterHead))} ${renderHead(frontmatterHead && filterOutHeadDescription(frontmatterHead))}

Loading…
Cancel
Save