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