织梦dedecms如何生成谷歌sitemap.xml网站地图

织梦dedecms如何生成谷歌sitemap.xml网站地图,第1张

概述1.首先制作sitemap模板新站一个记事本文件,把文件名改成sitemap.xml(记得后缀亦改),然后用记事本格式打开,粘贴下面的一段代码(*处用自己首页域名代替),将它上传至模板目录,比如templets/default中:<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.google.com/schemas/sitemap/0.84"><url><loc>http://www.gsjiewang.com/</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://www.gsjiewang.com[field:typelink /]</loc><changefreq>daily</changefreq><priority>0.8</priority></url>{/DEDE:channel}{DEDE:arclist row=2000 orderby=pubdate}<url><loc>http://www.gsjiewang.com[field:arcurl/]</loc><lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod><changefreq>monthly</changefreq></url>{/dede:arclist}</urlset>其中channel row是网站的频道数量,arclist row是文章数量(可以往一个上限值设),根据实际要求更改。将上面的http://liumiao.me改成你网站的首选域名2.生成sitemap.xml前面所制作的仅是模板,现在通过dede后台的html更新>>主页更新向导来生成。在选择主页模板中填入模板路径,比如 default/sitemap.xml,在主页位置填入../sitemap.xml,然后点更新主页html即可。通过以上简单的两步,google sitemap制作完成。上传的步骤在这里就不再啰嗦了。点击看大图演示:

<div ID="MyContent">









{:arclist row=1 titlelen=24 orderby=pubdate}


daily
1.0


[fIEld:typelink /]
daily
0.8


[field:arcurl/]
[field:pubdate function=strftime('%Y-%m-%d',@me)/]
monthly







>主页更新向导来生成。在选择主页模板中填入模板路径,比如 default/sitemap.xml,在主页位置填入../sitemap.xml,然后点更新主页HTML即可。


总结

以上是内存溢出为你收集整理的织梦dedecms如何生成谷歌sitemap.xml网站地图全部内容,希望文章能够帮你解决织梦dedecms如何生成谷歌sitemap.xml网站地图所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/1066473.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存