我正在跟踪https://nuxtjs.org/docs/features/meta-tags-seo/的seo文档,在一个netifly托管的nuxt项目wwww.estudiosclaw.com中
当我在chrome中运行灯塔检查器时,它说元描述是空的(在html的顶部是apeears )。
当我直接退休时,所有的支票都是红色的。
在谷歌搜索中,输入"estudios“只会出现导航栏标题。
我已经根据页面设置了我所有的元描述。
示例:
head() {
return {
title: `${this.about.data.attributes.title}`,
meta: [
{
hid: "description",
name: `${this.about.data.attributes.title} - Estudios Claw`,
content: `${this.about.data.attributes.description}`,
},
],
};
},
发布于 2022-03-22 14:38:48
您需要生成像<meta name=description content="This is the description of the page.">
这样的元标记。你的代码不会那么做的。链接到的示例代码表明,hid
和name
都应该是"description"
(字面意思)。您似乎要将页面标题放入<meta>
标记的<meta>
属性中,这是不正确的。正确的代码应该更像:
head() {
return {
title: `${this.about.data.attributes.title} - Estudios Claw`,
meta: [
{
hid: "description",
name: "description",
content: `${this.about.data.attributes.description}`,
},
],
};
},
https://stackoverflow.com/questions/71571875
复制相似问题