将LocalBusiness模式添加到首页中-是否要从其他页面链接到LocalBusiness?

时间:2019-11-08 10:27:06

标签: schema

根据众多指南,我正在网站上实现架构。

据我了解,LocalBusiness架构只能放置在您决定放置在您首页上的网站的一页上。

这是我的主页架构(已删除细节):

<script type="application/ld+json">
{
    "@context":"https://schema.org",
    "@graph":[
        {
            "@type": "LocalBusiness",
            "@id": "https://www.example.net/#localbusiness",
            "name": "My Business Name",
            "url": "https://www.example.net/",
            "description": "My Business Description",
            "logo":{
                "@type":"ImageObject",
                "@id":"https://www.example.net/#logo",
                "url":"https://www.example.net/-/graphics/logo-share.png",
                "width":844,
                "height":155,
                "caption":"My Business Name"
            },
            "image":{
                "@id":"https://www.example.net/#logo"
            },
            "telephone": "01234567890",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": "Address Line 1",
                "addressLocality": "City",
                "addressRegion": "County",
                "postalCode": "Postcode",
                "addressCountry": "GB"
            },
            "openingHours": "Mo,Tu,We,Th,Fr 09:00-18:00",   
            "sameAs": [ 
                "https://twitter.net/abc",
                "https://uk.linkedin.net/in/abc",
                "https://www.yell.net/biz/abc/"
            ],
            "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "5",
                "bestRating": "5",
                "ratingCount": "7"
            }
        },
        {
            "@type":"WebSite",
            "@id":"https://www.example.net/#website",
            "url":"https://www.example.net/",
            "name":"My Business Name",
            "publisher":{
                "@type": "LocalBusiness",
                "@id": "https://www.example.net/#localbusiness"
            }
        },
        {
            "@type":"WebPage",
            "@id":"https://www.example.net/#webpage",
            "url":"https://www.example.net/",
            "inLanguage":"en-GB",
            "name":"My Business Name",
            "isPartOf":{
                "@id":"https://www.example.net/#website"
            },
            "description":"My Business Description"
        }
    ]
}
</script>

对于其他页面,我使用的是类似的架构,但没有“ LocalBusiness”细分,例如:

<script type="application/ld+json">
{
    "@context":"https://schema.org",
    "@graph":[
        {
            "@type":"WebSite",
            "@id":"https://www.example.net/#website",
            "url":"https://www.example.net/",
            "name":"My Business Name",
            "publisher":{
                "@type": "LocalBusiness",
                "@id": "https://www.example.net/#localbusiness"
            }
        },
        {
            "@type":"WebPage",
            "@id":"https://www.example.net/#webpage",
            "url":"https://www.example.net/",
            "inLanguage":"en-GB",
            "name":"My Business Name",
            "isPartOf":{
                "@id":"https://www.example.net/#website"
            },
            "description":"My Business Description"
        }
    ]
}
</script>

我正在使用“发布者”选项,并通过“ https://www.example.net/#localbusiness”将ID链接到LocalBusiness。

如果我通过Google的结构化数据测试工具运行此程序,则它会显示要求的“名称”和“地址”值的错误。

有人能为我指明正确的方向,即我如何仅在主页上获得LocalBusiness信息,但仍链接到其他页面上的数据。

0 个答案:

没有答案