zoukankan      html  css  js  c++  java
  • 织梦 百度sitemap制作教程

    一、新建一个sitemap.htm模板

    1. 登录dedecms后台,选择【模板】-【模板管理】-【默认模板管理】

    2. 点击最下面的【新建模板】新建一个模板,并复制下面这段代码进去(将代码中的域名改为自己的):
      <?xml version="1.0" encoding="UTF-8"?>
      <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
      <url>
          <loc>https://www.bjqxwh.com/index.html</loc>
          <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate}
          [field:pubdate function=strftime('%Y-%m-%d',@me)/]
          {/dede:arclist}</lastmod>
          <changefreq>always</changefreq>
          <priority>1.0</priority>
      </url>
       
      {dede:channel row='200' type='top'}
      <url>
          <loc>https://www.bjqxwh.com[field:typelink /]</loc>
          <changefreq>always</changefreq>
          <priority>0.8</priority>
      </url>
      {/dede:channel}
       
      {dede:channel type='son' typeid='1'}
      <url>
      <loc>https://www.bjqxwh.com[field:typelink /]</loc>
      <changefreq>daily</changefreq>
      <priority>0.7</priority>
      </url>
      {/dede:channel}
       
      {dede:arclist row='5000' orderby=pubdate}
      <url>
          <loc>https://www.bjqxwh.com[field:arcurl/]</loc>
          <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
          <changefreq>always</changefreq>
          <priority>0.6</priority>
      </url>
      {/dede:arclist}
      </urlset>
      说明:这个是url调用代码,请直接将每个代码的域名(https://www.bjqxwh.com)改成自己的即可,第一个代码块为首页,第二个为栏目页,第三个为二级栏目页,第四个为内容页,row表示url条数,type='top'表示一级栏目,type='son' 表示二级栏目,typeid='1'表示一级栏目id。
    3. 将改模板命名为:sitemap.htm,PS:请记得将代码中的域名改为自己的域名,然后保存!如下图

      END

    二、新建一个单页文档管理

    1. dedecms后台选择【核心】-【频道模型】-【单页文档管理】,如下图:
    2. 然后选择【增加一个页面】,如下图所示:
    3. 对照上图并填入相对于的信息:

      页面标题:sitemap

      关联标识: default

      模板文件名:{style}/sitemap.htm

      文件名: sitemap.xml

    三、生成sitemap.xml地图

    1. 【核心】-【频道模型】-【单页文档管理】-【更新所有页面】即可,更新之后访问http://您的域名/sitemap.xml查看地图

    2.  
      每次更新完文章网站内容都需要执行这样的操作【核心】-【频道模型】-【单页文档管理】-【更新所有页面】才能生成sitemap地图
  • 相关阅读:
    echarts图形的位置布局如何调整
    IDEA在写springboot项目的时候遇见的问题:Caused by: java.lang.NoClassDefFoundError: com/fasterxml/classmate/TypeResol
    【学习总结】linux命令:ps -ef | grep xxxserver | grep -v grep|wc -l
    linux中管道符“|”的作用 find的作用
    linux系统中的管道“|”命令的作用
    JDBC管理事务
    SQL注入的问题&使用PreparedStatement对象防止SQL注入
    JDBC对象详解DriverManager&Connection&Statement
    MySQL安装&使用DataGrip连接数据库
    红黑树(R-B树,对称二叉B树)
  • 原文地址:https://www.cnblogs.com/init-007/p/10100915.html
Copyright © 2011-2022 走看看