HTML网站中的实施结构化架构

问题描述 投票:0回答:1

我正在为我的网站实施结构化数据(schema.org)。

我被困于ratingValuereviewCount的投入,我能够动态投入的其他一切。

"review": [
    {
        "@type": "Review",
        "reviewRating":{
            "@type": "Rating",
            "ratingValue": "4",
            "bestRating": "5"
        },
        "author":{
            "@type": "Organization",
            "name": "xyz"
        }
    }
],
"aggregateRating": 
{
    "@type": "AggregateRating",
    "ratingValue": "3.7",
    "reviewCount": "15"
}

我可以在哪里放置reviewCountratingValue?我们不要求客户提供任何评论/评分

schema.org json-ld
1个回答
0
投票

[我认为在您的情况下,使用AggregateRating没有任何意义,因为(假定的)网站作者只发表了一篇评论。 “集合”基本上是指“集合的摘要”,因此要使用AggregateRating,您要说有或可能有多个评论-不仅仅是一个评论。

假设这是Product,我将改用此标记:

{
    "@context": "https://schema.org/",
    "@type": "Product",
    "name": "Some Product",
    "description": "This is some product",
    "review": {
        "@type": "Review",
        "author": {
            "@type": "Organization",
            "name": "xyz"
        },
        "reviewRating": {
            "@type": "Rating",
            "bestRating": "5",
            "ratingValue": "4",
            "worstRating": "1"
        }
    }
}
推荐使用[AggregateRating中的[Structured Data Testing Tool,但不是必需的。

如果由于某种原因必须在该项目中使用AggregateRating,则可以将reviewCount硬编码为1,然后将ratingValue设置为已经放入reviewRating的值。同样,这违反了AggregateRating的目的。

© www.soinside.com 2019 - 2024. All rights reserved.