asp.net - 如何在网站中添加丰富网页摘要?

标签 asp.net xml seo google-search rich-snippets

我正在通过评论网站获取 XML 数据,但我需要为此添加丰富的代码段,以便谷歌可以显示评分,但我找不到确切的示例

这是 XML 的一部分

 <reviewDetails>
    <reviewDetail>
        <score>5</score>
        <scoremax>5</scoremax>
        <text>
            <![CDATA[Something something something.]]>
        </text>
        <user>
            <![CDATA[Person]]>
        </user>
        <id>1494839</id>
        <createdate>20160420</createdate>
        <beveeltAan>
            <![CDATA[ja]]>
        </beveeltAan>
        <reviewID>1494839</reviewID>
        <reviewDatum>20160420</reviewDatum>
        <questions>
            <question>
                <label>
                    <![CDATA[Verkooptraject]]>
                </label>
                <score>-1</score>
                <order>1</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
            <question>
                <label>
                    <![CDATA[Informatie op SiteToGo.nl]]>
                </label>
                <score>-1</score>
                <order>2</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
            <question>
                <label>
                    <![CDATA[Communicatie website bouwer]]>
                </label>
                <score>-1</score>
                <order>3</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
            <question>
                <label>
                    <![CDATA[Bereikbaarheid]]>
                </label>
                <score>-1</score>
                <order>4</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
            <question>
                <label>
                    <![CDATA[Snelheid oplevering]]>
                </label>
                <score>-1</score>
                <order>5</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
            <question>
                <label>
                    <![CDATA[Prijs-/kwaliteit verhouding]]>
                </label>
                <score>-1</score>
                <order>6</order>
                <type>
                    <![CDATA[score]]>
                </type>
            </question>
        </questions>
        <kooptvakeronline></kooptvakeronline>
        <geslacht>
            <![CDATA[vrouw]]>
        </geslacht>
        <leeftijd>0</leeftijd>
        <gekochtproduct></gekochtproduct>
        <companyResponse></companyResponse>
        <filterCode></filterCode>
    </reviewDetail>
    <reviewDetail>

那么我如何在此 xml 中添加丰富的代码段,以便谷歌能够在我的网站上显示评级。

最佳答案

在我们提供建议之前,您需要展示一些进展。 这是我建议您执行的操作。

  1. 转到 schema.org ( http://schema.org/docs/full.html ) 并确定与您的 XML 数据相关的类型。
  2. 确定类型后,查找与 XML 源中使用的术语含义相同的属性。
  3. 使用 schema.org 上的相关示例并将它们应用于您修改后的数据(步骤 1 和 2)。
  4. 显示第 1-3 步的结果,并要求进一步说明如何改进结果或处理 Google 结构化数据测试工具 (https://developers.google.com/structured-data/testing-tool/) 显示的错误消息。

关于asp.net - 如何在网站中添加丰富网页摘要?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36763186/

相关文章:

ASP.NET:仅在单击“提交”时执行验证

java - android - 从我的应用中上次访问的页面恢复

c# - 处于 EndRootElement 状态的 token StartElement 将导致无效的 XML 文档

android - 如何在 Android 上更改打开的 Spinner 的文本背景颜色

.htaccess - 限制通过其父框架/域以外的任何内容访问 iframed 域

c# - ASP.net 和 MySQL 之间的通信问题

asp.net - Asp.net web.config处理错误页面 “File or directory not found”

javascript - 在 gridview 中突出显示选定的行而不回发

php - 我如何在 Symfony PHP 中生成一个友好的 URL?

html - 301 重定向,目标 URL 上不带斜杠