蓝莓博客

  • 今天是

织梦熊掌号JSON LD结构化数据代码分享

摘要:织梦DEDECMS熊掌号JSON LD结构化数据代码分享 效果: 注意:@id里面的地址必须是自适应网站或者手机站,pc端链接是不支持! 百度官方JSON-LD示例: scripttype=application/ld+json{@context:https://......
分享到:

织梦DEDECMS熊掌号JSON LD结构化数据代码分享

效果:


注意:@id里面的地址必须是自适应网站或者手机站,pc端链接是不支持!

百度官方JSON-LD示例:

<scripttype="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://ziyuan.baidu.com/college/articleinfo?id=1464","appid":"1582926961485115","title":"百度移动搜索落地页体验白皮书——广告篇2.0","images":["https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png","https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png","https://m.baidu.com/static/index/plus/plus_logo.png"],"description":"优质合理的广告作为信息的补充,广受用户喜欢。2017年初百度用户体验部针对用户进行了满意度调研,发现很多恶意低质的广告严重破坏着用户的搜索体验。","pubDate":"2017-06-15T08:00:01"}</script>


织梦DEDECMS熊掌号JSON LD结构化数据代码分享

文章内容页调用代码:

<scripttype="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"{dede:global.cfg_basehost/}{dede:geturlrunphp='yes'}@me=GetCurUrl();{/dede:geturl}","appid":"你的熊掌号ID","title":"{dede:field.title/}","images":["{dede:global.cfg_basehost/}{dede:field.litpic/}"],"description":"{dede:field.descriptionfunction=html2text(@me)/}","pubDate":"{dede:field.pubdatefunction="MyDate('Y-m-dTH:i:s',@me)"/}","Update":"{dede:field.pubdatefunction="MyDate('Y-m-dTH:i:s',@me)"/}"}</script>


首页调用代码:

<scripttype="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"{dede:global.cfg_basehost/}","appid":"你的熊掌号ID","title":"{dede:global.cfg_webname/}","images":["https://m.lol9.cn/style/images/logo.png"],"description":"{dede:global.cfg_description/}","pubDate":"{dede:tagnamerunphp='yes'}@me=date("Y-m-dTH:i:s",time());{/dede:tagname}"}</script>


来源于蓝莓原文地址: http://www.xiyi88.cn/xq/dede_1487.html