diff --git a/nuxt.config.js b/nuxt.config.js index b3213e5..9a94607 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -52,7 +52,7 @@ export default { ** https://nuxtjs.org/guide/plugins */ plugins: [ - {src: '@/plugins/element-ui', ssr: true}, + {src: '@/plugins/element-ui'}, {src: '@/plugins/vditor', ssr: false} ], /* diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue index 9fafa11..221c6d4 100644 --- a/pages/article/_article_id.vue +++ b/pages/article/_article_id.vue @@ -143,7 +143,41 @@ }, head () { return { - title: this.article.articleTitle + title: this.article.articleTitle||'RYMCU - 嵌入式知识学习交流平台', + meta: [ + { + name: 'keywords', + content: this.article.articleTags || 'RYMCU' + }, + { + name: 'description', + content: this.article.articlePreviewContent + }, + { + name: 'site_name', + content: 'RYMCU' + }, + { + name: 'url', + content: this.article.articlePermalink + }, + { + name: 'og:title', + content: this.article.articleTitle + ' - RYMCU' + }, + { + name: 'og:description', + content: this.article.articlePreviewContent + }, + { + name: 'og:site_name', + content: 'RYMCU' + }, + { + name: 'og:url', + content: this.article.articlePermalink + } + ] } }, data() {