zoukankan      html  css  js  c++  java
  • 为DEDE织梦添加XMl网站地图

    在后台管理:

        核心-频道模型-单页文档管理-增加一个新页面

        

    模版文件放在你现在使用的templets目录下,sitemap.xml的内容如下

    <?xml version="1.0" encoding="UTF-8"?>
        
    <urlset
     xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
     http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> 
    
    <url>
    <loc>http://www.domain.com</loc>
    <lastmod>{dede:arclist row=1 titlelen=30 orderby=pubdate}[field:pubdate function=strftime('%Y-%m-%d',@me)/]{/dede:arclist}</lastmod>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
    </url>
    
    {dede:channel row='300' type='top'}
    <url>
    <loc>http://www.domain.com[field:typelink /]</loc>
    <changefreq>daily</changefreq>
    <priority>0.8</priority>
    </url>
    {/dede:channel}
    
    {dede:arclist row="2000" orderby="pubdate"}
    <url>
    <loc>http://www.domain.com[field:arcurl/]</loc>
    <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    </url>
    {/dede:arclist}
    </urlset>

    把里面的www.domain.com修改成你自己的域名,就ok了。 这里row是列表的数量,看自己的情况设定。

  • 相关阅读:
    小福bbs-冲刺日志(第三天)
    小福bbs-冲刺日志(第二天)
    小福bbs-冲刺日志(第一天)
    灯塔-冲刺集合
    团队作业第六次—事后诸葛亮
    灯塔-冲刺总结
    灯塔-测试总结
    灯塔-冲刺日志(第七天)
    灯塔-冲刺日志(第六天)
    灯塔-冲刺日志(第五天)
  • 原文地址:https://www.cnblogs.com/dying/p/3648876.html
Copyright © 2011-2022 走看看