小编doi*_*web的帖子

AMP文章Microdata中的SVG图像?

在尝试schema.org/Article针对Google的结构化数据测试工具验证时,我注意到如果您指定SVG图像,则会出错:

徽标提供的值必须是有效的URL.

要求:

AMP文章(这是什么?)

当URL被改变为具有一个.png(或.jpg,.bmp,.webp等)延伸,而不是.svg,它通过验证.

这是我正在使用的示例:

<div itemscope itemtype="http://schema.org/Article">
    <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
        <meta itemprop="name" content="Example" />
        <meta itemprop="url" content="http://example.com" />
        <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
            <meta itemprop="url" content="http://example.com/logo.svg" />
            <meta itemprop="width" content="600" />
            <meta itemprop="height" content="60" />
        </div>
    </div>
    <meta itemprop="dateModified" content="2016-01-05T12:43" />
    <meta itemprop="datePublished" content="2016-01-05T12:43" />
    <meta itemprop="headline" content="Example" />
    <meta itemprop="name" content="Example" />
    <meta itemprop="author" content="Example" />
    <link itemprop="mainEntityOfPage" href="http://example.com/article" …
Run Code Online (Sandbox Code Playgroud)

svg microdata schema.org google-rich-snippets amp-html

4
推荐指数
1
解决办法
1956
查看次数