我遇到了一个与nuxt js的头部有关的问题。我有一个新闻网站,当我进入详细信息页面时,会像波纹管一样输入代码。
head() {
return {
title: 'Rumaholi.com - ' + this.news.title,
meta: [
{ hid: 'description', name: 'description', content: this.news.title },
{ hid: 'og:title', property: 'og:title', content: this.news.title },
{ hid: 'og:url', property: 'og:url', content: 'http://www.rumaholi.com/' + this.slug },
{ hid: 'og:image', property: 'og:image', content: this.news.image },
{ hid: 'og:description', property: 'og:description', content: this.news.title },
{ property: 'og:type', content: 'article' },
],
}
},
当我在Facebook开发人员上进行测试时,显然我的头使用了索引
head: {
title: 'Rumaholi.com - Home',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'keywords', content: 'Oli, Oli Motor, Oli Mobil, Oil, Car Oil, Automotive, News, News Automotive, Berita, Berita Automotive, Berita Otomotif'},
{ hid: 'description', name: 'description', content: 'Rumaholi.com - Berita Automotive | Berita Automotive National | Berita Automotive International' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/icon_LnO_icon.ico' },
{
rel: 'stylesheet',
href:
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'
}
]
},
请帮助解决该问题