1、首先我们需要建立一个记事本,命名为sitemap.xml后保存。
2、将我提供的代码拷贝到记事本里,然后保存。<?xml version="1.0" encoding="UT僻棍募暖F-8"?><urlset xmlns="http://www.google.com/schemas/sitemap/0.84"><url> <loc>http://127.0.0.1/</loc> <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate} [field:pubdate function=strftime('%Y-%m-%d',@me)/] {/dede:arclist}</lastmod> <changefreq>daily</changefreq> <priority>1.0</priority></url>{dede:channel row='23' type='top'}<url><loc>http://127.0.0.1[field:typelink /]</loc><changefreq>daily</changefreq><priority>0.8</priority></url>{/dede:channel}{dede:arclist row=2000 orderby=pubdate}<url> <loc>http://127.0.0.1[field:arcurl/]</loc> <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod> <changefreq>monthly</changefreq></url>{/dede:arclist}</urlset>
3、将sitemap.xml文件上传到根目录/templets/default里。
4、然后登陆网站后台更新网站首页即可,如下图设置更新。
