From f545e2935427bc8ca70805c8846bd7049a59589c Mon Sep 17 00:00:00 2001 From: wuxinhua Date: Mon, 11 Nov 2019 20:34:53 +0800 Subject: [PATCH] fix: remove default title description setting --- packages/saber/vue-app/create-app.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/saber/vue-app/create-app.js b/packages/saber/vue-app/create-app.js index 57e7e7bd2..fe8eedca1 100644 --- a/packages/saber/vue-app/create-app.js +++ b/packages/saber/vue-app/create-app.js @@ -55,19 +55,22 @@ export default context => { delete htmlAttrs.lang } - const title = this.$siteConfig.title || 'Saber' + const { title, description } = this.$siteConfig const defaultMeta = [ { name: 'generator', content: `Saber v${__SABER_VERSION__}` - }, - { - name: 'description', - content: `${this.$siteConfig.description || 'A framework for building modern static websites'}` } ] + if (description) { + defaultMeta.push({ + name: 'description', + content: description + }) + } + return { ...head, htmlAttrs,