diff --git a/packages/saber/vue-app/create-app.js b/packages/saber/vue-app/create-app.js index 88a79a5fc..fe8eedca1 100644 --- a/packages/saber/vue-app/create-app.js +++ b/packages/saber/vue-app/create-app.js @@ -54,15 +54,29 @@ export default context => { if (!htmlAttrs.lang) { delete htmlAttrs.lang } + + const { title, description } = this.$siteConfig + + const defaultMeta = [ + { + name: 'generator', + content: `Saber v${__SABER_VERSION__}` + } + ] + + if (description) { + defaultMeta.push({ + name: 'description', + content: description + }) + } return { ...head, htmlAttrs, + title, meta: [ - { - name: 'generator', - content: `Saber v${__SABER_VERSION__}` - }, + ...defaultMeta, ...(head.meta || []) ] }