由于许多网站都已经做了百度MIP适配,是为了提高移动端的用户体验与排名,那么互补网在这里就为大家讲下做好了百度MIP页面,那么如何在网站源代码中进行配置调用?
方法很简单,代码如下:
<script type="application/ld+json"> { "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", "@id": "当前页面网址", "appid": "百度后台appid号", "title": "网页的title", "images": [], "pubDate": "时间(如:2019-09-0421T03:20:11)", "upDate": "时间(如:2019-09-0421T03:20:11)", "data":{ "WebPage":{ "headline": "网页的title", "pcUrl": "PC端页面网址", "wapUrl": "移动端页面网址", "mipUrl": "百度mip页面网址", "fromSrc": "网站名称", "datePublished": "时间(如:2019-09-0421T03:20:11)" } } } </script>
将以上代码加入到head之中即可,注意里面网址的配置。