File tree 1 file changed +11
-1
lines changed
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(
158
158
: '<meta name="viewport" content="width=device-width,initial-scale=1">'
159
159
}
160
160
<title>${ title } </title>
161
- <meta name="description" content="${ description } ">
161
+ ${
162
+ isDescriptionOverridden ( head )
163
+ ? ''
164
+ : `<meta name="description" content="${ description } ">`
165
+ }
162
166
${ stylesheetLink }
163
167
${ metadataScript . inHead ? metadataScript . html : '' }
164
168
${
@@ -258,6 +262,12 @@ function filterOutHeadDescription(head: HeadConfig[] = []) {
258
262
} )
259
263
}
260
264
265
+ function isDescriptionOverridden ( head : HeadConfig [ ] = [ ] ) {
266
+ return head . some ( ( [ type , attrs ] ) => {
267
+ return type === 'meta' && attrs ?. name === 'description'
268
+ } )
269
+ }
270
+
261
271
function isMetaViewportOverridden ( head : HeadConfig [ ] = [ ] ) {
262
272
return head . some ( ( [ type , attrs ] ) => {
263
273
return type === 'meta' && attrs ?. name === 'viewport'
You can’t perform that action at this time.
0 commit comments