如何使用schema.org设置Review-aggregate?

时间:2016-12-10 16:33:29

标签: html5 google-search schema.org

我有一个项目 - http://preloaders.net。我已对其进行设置,以便在Google搜索中显示评分(标题下方的橙色星标,例如尝试输入preloader spinner关键字)。一切都运行正常,除了主页,因为我刚修好它。

我现在正在将整个标记重新编码为HTML5(我很新手)并使用schema.org并将所有产品包含到整个模式中,但我不知道模式中Review-aggregate的替代品是什么.org是,所以我正在尝试WebPage。 Google网站管理员不会显示错误,但问题是:以下代码是否仍然显示明星或我应该做其他事情?

<!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>my title</title>
    </head>

    <body>
        <nav>
            <a href=""></a>
        </nav>
        <main>
            <section>
                <h1>AJAX LOADERS</h1>
                <article itemscope itemtype="http://schema.org/Product">
                    <figure>
                        <img itemprop="image" src="/preloader.gif" alt="">
                        <figcaption itemprop="description">
                            Spinning Christmas tree with balls.
                        </figcaption>
                    </figure>
                    <a href="#" title="#" itemprop="url">
                        <h3 itemprop="name">3D Christmas tree </h3>
                    </a>
                    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                        <span itemprop="priceCurrency" content="USD">$</span><span class="price" itemprop="price">2.95</span>
                    </div>
                    <div class="favorite"></div>
                    <div class="add-to-cart"></div>
                    <div class="frames-amount">30 fr</div>
                    <div class="dimensions">256x256</div>
                    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
                        Average Rating: <span itemprop="ratingValue">5</span>
                        Votes: <span itemprop="ratingCount">12</span>
                    </div>
                </article>
            </section>
            <aside>
                <article itemscope itemtype="http://schema.org/Product">
                    <a href="/en/free">
                        <h3 itemprop="name">Free templates</h3>
                        <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                            <span itemprop="priceCurrency" content="USD">$</span><span class="price" itemprop="price">0</span>
                        </div>
                        <div itemprop="description">
                            Spinning Christmas tree with balls.
                        </div>
                        <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
                            Average Rating: <span itemprop="ratingValue">5</span>
                            Votes: <span itemprop="ratingCount">12</span>
                        </div>
                    </a>
                </article>
            </aside>
        </main>
        <footer>
            <nav>
                <a href=""></a>
            </nav>
        </footer>
        <script type="application/ld+json">
        { "@context": "http://schema.org",
          "@type": "WebPage",
          "name": "Loading GIF & APNG (AJAX loaders) generator",
          "description": "More than 800 free and premium ajax loader (loading animated GIF and APNG) spinners, bars and 3D animations generator for AJAX and JQuery",
          "aggregateRating":
            {"@type": "AggregateRating",
             "ratingValue": "4.9",
             "reviewCount": "7",
             "itemReviewed": "AJAX loaders generator"
            }
        }
        </script>
    </body>

    </html>

对不起问题,只需要确保我的方向正确。

提前致谢。

1 个答案:

答案 0 :(得分:1)

Here is an example of what you have to do

And here is the official documentation

你所做的是类似于例子中的代码所以我猜你所做的就足以拥有明星了