MENU

Google结构化数据格式和百度结构化数据格式

June 22, 2019 • 已被 648 位童鞋围观过 • 代码分享

Google结构化数据格式样式 Demo 如下

<script type = "application/ld+json" > {
    "@context": "http://schema.org",
    "@type": "Book",
    "@id": "小说url",
    "name": "小说名字",
    "description": "小说简介",
    "image": "小说图片地址",
    "potentialAction": {
        "@type": "ReadAction",
        "target": {
            "@type": "EntryPoint",
            "actionPlatform": ["http://schema.org/DesktopWebPlatform", "http://schema.org/MobileWebPlatform"],
            "urlTemplate": "小说第一章节地址"
        }
    },
    "url": "小说url",
    "author": {
        "@type": "Person",
        "name": "小说作者",
        "url": "小说作者url"
    },
    "datePublished": "2017-07-18",
    "publisher": {
        "@type": "Organization",
        "name": "网站名称",
        "logo": "网站Logo",
        "url": "网站url"
    }
} 
</script>

百度结构化数据格式 Demo (百度熊掌号的接口)

<script type="application/ld+json">
    {
        "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
        "@id": "文章url",
        "appid": "熊掌号appid",
        "title": "文章标题",
        "images": ["文章缩略图"],
        "description": "文章简介",
        "pubDate": "更新时间"
    }
</script>
Last Modified: September 28, 2023