
洞悉互聯(lián)網(wǎng)前沿資訊,探尋網(wǎng)站營銷規(guī)律
作者:Smileby陌少羽 | 2019-05-15 12:14 |點擊:
	官方號接入只是移動端的內(nèi)容頁面,所以改造只需要對移動內(nèi)容頁面模版修改幾處即可。
	對于普通移動站,一般是H5頁面或者WAP頁面,也可能是自適應(yīng)頁面。
	當(dāng)擁有了官方號權(quán)限之后,在百度站長平臺左側(cè)會出現(xiàn)官方號這個選項,點擊數(shù)據(jù)引入,在開發(fā)指南這里有一份改造說明:
	
	添加canonical標(biāo)簽(必選)
	
	添加Json_LD數(shù)據(jù)(必選)
	
	添加官方號ID聲明(H5頁面必選)
	
	添加關(guān)注功能代碼(強烈推薦)
	
	一共有四個改造處,對于織夢來說這四點,都是比較簡單的。
	改造一共有四步,分別是根據(jù)官方的開發(fā)指南來的。
	首先找到自己移動站點的內(nèi)容頁模版,一般在/templets/模版目錄/下面的以article開頭的模版文件。強烈建議大家使用專業(yè)的網(wǎng)頁編輯工具比如Dreamweaver之類,而不是用記事本。
	
	
	我直接貼下代碼 大家把對應(yīng)的id改成自己的id即可
| 
					 
								<link rel="canonical" href="{dede:global.cfg_indexurl/}"/> 
							
								<script src="//msite.baidu.com/sdk/c.js?appid=1625074370139423"></script> 
							
								<script type="application/ld+json"> 
							
								    { 
							
								        "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", 
							
								        "@id": "{dede:global.cfg_indexurl/}", 
							
								        "appid": "1625074370139423", 
							
								        "title": "{dede:global.cfg_webname/}", 
							
								        "images": [ 
							
								              "{dede:global.cfg_templets_skin/}/images/foxl.jpg" 
							
								          ], 
							
								       "pubDate": "{dede:arclist  row='1' orderby ='pubdate'} 
							
								[field:pubdate name='senddate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /]{/dede:arclist}" 
							
								} 
							
								  </script> 
						 | 
			
	這里注意 網(wǎng)站要開啟絕對路徑  如果沒有開啟自己在網(wǎng)址前面增加一個{dede:global.cfg_basehost/}
	 
| 
				 
							<link rel="canonical" href="{dede:field name='arcurl'/}"/> 
						
							<script src="//msite.baidu.com/sdk/c.js?appid=1625074370139423"></script> 
						
							<script type="application/ld+json"> 
						
							    { 
						
							        "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", 
						
							        "@id": "{dede:field name='arcurl'/}", 
						
							        "appid": "1625074370139423", 
						
							        "title": "{dede:field.title/}", 
						
							        "images": [ 
						
							              "{dede:field.litpic /}" 
						
							          ], 
						
							       "pubDate": "{dede:field name='senddate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /}" 
						
							} 
						
							</script> 
					 | 
		
