|
|
|
@ -158,7 +158,11 @@ export async function renderPage(
|
|
|
|
|
: '<meta name="viewport" content="width=device-width,initial-scale=1">'
|
|
|
|
|
}
|
|
|
|
|
<title>${title}</title>
|
|
|
|
|
<meta name="description" content="${description}">
|
|
|
|
|
${
|
|
|
|
|
isDescriptionOverridden(head)
|
|
|
|
|
? ''
|
|
|
|
|
: `<meta name="description" content="${description}">`
|
|
|
|
|
}
|
|
|
|
|
${stylesheetLink}
|
|
|
|
|
${metadataScript.inHead ? metadataScript.html : ''}
|
|
|
|
|
${
|
|
|
|
@ -258,6 +262,12 @@ function filterOutHeadDescription(head: HeadConfig[] = []) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isDescriptionOverridden(head: HeadConfig[] = []) {
|
|
|
|
|
return head.some(([type, attrs]) => {
|
|
|
|
|
return type === 'meta' && attrs?.name === 'description'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isMetaViewportOverridden(head: HeadConfig[] = []) {
|
|
|
|
|
return head.some(([type, attrs]) => {
|
|
|
|
|
return type === 'meta' && attrs?.name === 'viewport'
|
|
|
|
|