Skip to content

Commit 5a02e2a

Browse files
author
ludanxer
committed
fix: duplicate meta in ssr
1 parent 8df4ed7 commit 5a02e2a

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

packages/@vuepress/core/lib/client/index.ssr.html

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<meta name="description" content="{{ description }}">
88
<meta name="generator" content="VuePress {{ version }}">
99
{{{ userHeadTags }}}
10-
{{{ pageMeta }}}
1110
{{{ renderResourceHints() }}}
1211
{{{ renderStyles() }}}
1312
</head>

packages/@vuepress/core/lib/node/build/index.js

-23
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ module.exports = class Build extends EventEmitter {
138138
readline.cursorTo(process.stdout, 0)
139139
process.stdout.write(`Rendering page: ${pagePath}`)
140140

141-
// #565 Avoid duplicate description meta at SSR.
142-
const meta = (page.frontmatter && page.frontmatter.meta || []).filter(item => item.name !== 'description')
143-
const pageMeta = renderPageMeta(meta)
144-
145141
const context = {
146142
url: page.path,
147143
userHeadTags: this.userHeadTags,
148-
pageMeta,
149144
title: 'VuePress',
150145
lang: 'en',
151146
description: '',
@@ -225,24 +220,6 @@ function renderAttrs (attrs = {}) {
225220
}
226221
}
227222

228-
/**
229-
* Render meta tags
230-
*
231-
* @param {Array} meta
232-
* @returns {Array<string>}
233-
*/
234-
235-
function renderPageMeta (meta) {
236-
if (!meta) return ''
237-
return meta.map(m => {
238-
let res = `<meta`
239-
Object.keys(m).forEach(key => {
240-
res += ` ${key}="${escape(m[key])}"`
241-
})
242-
return res + `>`
243-
}).join('')
244-
}
245-
246223
/**
247224
* find and remove empty style chunk caused by
248225
* https://github.com/webpack-contrib/mini-css-extract-plugin/issues/85

0 commit comments

Comments
 (0)