File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,11 @@ export async function renderPage(
158158 : '<meta name="viewport" content="width=device-width,initial-scale=1">'
159159 }
160160 <title>${ title } </title>
161- <meta name="description" content="${ description } ">
161+ ${
162+ isDescriptionOverridden ( head )
163+ ? ''
164+ : `<meta name="description" content="${ description } ">`
165+ }
162166 ${ stylesheetLink }
163167 ${ metadataScript . inHead ? metadataScript . html : '' }
164168 ${
@@ -258,6 +262,12 @@ function filterOutHeadDescription(head: HeadConfig[] = []) {
258262 } )
259263}
260264
265+ function isDescriptionOverridden ( head : HeadConfig [ ] = [ ] ) {
266+ return head . some ( ( [ type , attrs ] ) => {
267+ return type === 'meta' && attrs ?. name === 'description'
268+ } )
269+ }
270+
261271function isMetaViewportOverridden ( head : HeadConfig [ ] = [ ] ) {
262272 return head . some ( ( [ type , attrs ] ) => {
263273 return type === 'meta' && attrs ?. name === 'viewport'
You can’t perform that action at this time.
0 commit comments