
生成PC端的sitemap.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{dede:global.cfg_basehost /}</loc>
<lastmod>{dede:arclist row='1'}[field:pubdate function=strftime('%Y-%m-%d',@me)/]{/dede:arclist}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
{dede:channelartlist row=50000 typeid='top'}
<url>
<loc>{dede:global.cfg_basehost /}{dede:field.typeurl/}</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
{dede:channel type=son noself=yes}
<url>
<loc>[field:global.cfg_basehost /][field:typeurl/]</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
{/dede:channel}
{/dede:channelartlist}
{dede:arclist row='50000' typeid="all"}
<url>
<loc>[field:global.cfg_basehost /][field:arcurl /]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
{/dede:arclist}
</urlset>
生成手机端的sitemap.xml
<url>
<loc>{dede:global.cfg_mobile /}</loc>
<mobile:mobile type="mobile"/>
<lastmod>{dede:arclist row='1' typeid="all"}[field:pubdate function=strftime('%Y-%m-%d',@me)/]{/dede:arclist}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
{dede:channelartlist row=50000 typeid='top'}
<url>
<loc>{dede:global.cfg_mobile /}{dede:field.typeurl/}</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
{dede:channel type=son noself=yes}
<url>
<loc>[field:global.cfg_mobile /][field:typeurl/]</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
{/dede:channel}
{/dede:channelartlist}
{dede:arclist row='50000' typeid="all"}
<url>
<loc>[field:global.cfg_mobile /][field:arcurl /]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
{/dede:arclist}
生成PC端的url.txt
{dede:arclist row='50000' typeid="all"}
[field:global.cfg_basehost /][field:arcurl /]
{/dede:arclist}
生成移动端的url.txt
{dede:arclist row='50000' typeid="all"}
[field:global.cfg_mobile /][field:arcurl /]
{/dede:arclist}
使用说明:
1、【系统设置】-【系统基本参数】-【添加新变量】增加一个手机站网址的参数:cfg_mobile

2、在织梦CMS模板文件夹下新建sitemap.htm、sitemap_m.htm、url.htm、url_m.htm等几个模板文件;
3、【频道模型】-【单页文档管理】新建单页;




4、【频道模型】-【单页文档管理】-【更新所有页面】

这些生成的sitemap.xml和url.txt文件可以通过百度站长工具自动抓取。