首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Nuxt Seo meta-描述

Nuxt Seo meta-描述
EN

Stack Overflow用户
提问于 2022-03-22 12:12:52
回答 1查看 395关注 0票数 1

我正在跟踪https://nuxtjs.org/docs/features/meta-tags-seo/的seo文档,在一个netifly托管的nuxt项目wwww.estudiosclaw.com中

当我在chrome中运行灯塔检查器时,它说元描述是空的(在html的顶部是apeears )。

当我直接退休时,所有的支票都是红色的。

在谷歌搜索中,输入"estudios“只会出现导航栏标题。

我已经根据页面设置了我所有的元描述。

示例:

代码语言:javascript
运行
复制
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}`,
        },
      ],
    };
  },
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-22 14:38:48

您需要生成像<meta name=description content="This is the description of the page.">这样的元标记。你的代码不会那么做的。链接到的示例代码表明,hidname都应该是"description" (字面意思)。您似乎要将页面标题放入<meta>标记的<meta>属性中,这是不正确的。正确的代码应该更像:

代码语言:javascript
运行
复制
head() {
    return {
      title: `${this.about.data.attributes.title} - Estudios Claw`,
      meta: [
        {
          hid: "description",
          name: "description",
          content: `${this.about.data.attributes.description}`,
        },
      ],
    };
  },
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71571875

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档