织梦熊掌号改造计划作者QQ876503456
1.判定网站手机版是否是 二级域名/二级目录
2.是否是自适应
1.添加到文章页/head前面
<script src="//msite.baidu.com/sdk/c.js?appid=1610134864179996"></script>
2.添加到文章页/head前面
<link rel="canonical" href="http://www.qianxianly.com/"/>
3.二级域名就选择第一个代码,二级目录就选择第二个代码
【第一个】
<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "http://m.qianxianly.com/view.php?aid={dede:field.id/}",
"appid": "1610134864179996",
"title": "{dede:field.title/}",
"images": [
"{dede:field.litpic runphp="yes"}
@me = (strpos(@me,'defaultpic')? "" : "".@me."");
{/dede:field.litpic}"
],
"description": "{dede:field.description function='html2text(@me)'/}",
"pubDate": "{dede:field name='senddate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /}"
}
</script>
【第二个】
<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "http://www.qianxianly.com/m/view.php?aid={dede:field.id/}",
"appid": "1610134864179996",
"title": "{dede:field.title/}",
"images": [
"{dede:field.litpic runphp="yes"}
@me = (strpos(@me,'defaultpic')? "" : "".@me."");
{/dede:field.litpic}"
],
"description": "{dede:field.description function='html2text(@me)'/}",
"pubDate": "{dede:field name='senddate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /}"
}
</script>
视频教程地址:QQ群640272099