織夢DEDECMS熊掌號(hào)JSON LD結(jié)構(gòu)化數(shù)據(jù)代碼分享

織夢DEDECMS熊掌號(hào)JSON LD結(jié)構(gòu)化數(shù)據(jù)代碼分享

效果:

注意:@id里面的地址必須是自適應(yīng)網(wǎng)站或者手機(jī)站,pc端鏈接是不支持!

百度官方JSON-LD示例:

<script type="application/ld+json">
    {
        "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
        "@id": "https://ziyuan.baidu.com/college/articleinfo?id=1464",
        "appid": "1582926961485115",
        "title": "百度移動(dòng)搜索落地頁體驗(yàn)白皮書——廣告篇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": "優(yōu)質(zhì)合理的廣告作為信息的補(bǔ)充,廣受用戶喜歡。2017年初百度用戶體驗(yàn)部針對(duì)用戶進(jìn)行了滿意度調(diào)研,發(fā)現(xiàn)很多惡意低質(zhì)的廣告嚴(yán)重破壞著用戶的搜索體驗(yàn)。",
        "pubDate": "2017-06-15T08:00:01"
    }
</script>

織夢DEDECMS熊掌號(hào)JSON LD結(jié)構(gòu)化數(shù)據(jù)代碼分享

文章內(nèi)容頁調(diào)用代碼:

<script type="application/ld+json"> {
  "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
  "@id": "{dede:global.cfg_basehost/}{dede:geturl runphp='yes'}
@me = GetCurUrl();
{/dede:geturl}",
  "appid": "你的熊掌號(hào)ID",
  "title": "{dede:field.title/}",
  "images": [
  "{dede:global.cfg_basehost/}{dede:field.litpic/}"
   ], 
  "description":"{dede:field.description function=html2text(@me)/}",
  "pubDate":"{dede:field.pubdate function="MyDate('Y-m-d\TH:i:s',@me)"/}",
  "Update":"{dede:field.pubdate function="MyDate('Y-m-d\TH:i:s',@me)"/}"
  }
  </script>

首頁調(diào)用代碼:

<script type="application/ld+json"> {
  "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
  "@id": "{dede:global.cfg_basehost/}",
  "appid": "你的熊掌號(hào)ID",
  "title": "{dede:global.cfg_webname/}",
  "images": [
  "https://www.xycn.org/style/images/logo.png"
   ], 
   "description":"{dede:global.cfg_description/}",
  "pubDate": "{dede:tagname runphp='yes'}@me = date("Y-m-d\TH:i:s", time());{/dede:tagname}"
  }
  </script>

 

 

THE END
亚洲中文色欧另类欧美,久久久久久久激情,亚洲 日韩 欧美 另类 国产,中文字幕高清无码男人的天堂 www.sucaiwu.net