厉大洪 發表於 2023-10-11 00:00:00

在Dedecms下面生成Google Sitemap的方法

<p><span style=" font-size: 14px;">1.在模版目录新建一个index.xml文件,内容如下:&nbsp;</span></p><p class="msgborder" style="margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; "><urlset xmlns="http://www.google.com/schemas/sitemap/0.84"><url><br/>
          <loc>https://www.jb51.net</loc>&nbsp;<br/>
          </url>&nbsp;<br/>
          {dede:arclist row=&quot;9999&quot; col=1 titlelen=&quot;200&quot; orderby=&quot;pubdate&quot;}&nbsp;<br/>
          <url>&nbsp;<br/>
          <loc>https://www.jb51.net</loc>&nbsp;<br/>
          </url>{/dede:arclist}&nbsp;<br/>
          </urlset>&nbsp;<!--?xml--></p><p><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  //请将其中网址改成您自己的. Row后面的数字请根据您自己的内容来定.例如您有1W文章可以写10000或者更大数字.&nbsp;</span><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  2.在后台点更新首页.模版选index.xml.&nbsp;</span><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  生成位置写站点根目录名称随便.如(sitemap.xml)&nbsp;</span><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  然后点生成就可以了.&nbsp;</span><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  3.然后就去Google添加吧.&nbsp;</span><br style=" font-size: 14px;"/><span style=" font-size: 14px;">  网址是:http://www.google.com/sitemaps/</span></p>
頁: [1]
查看完整版本: 在Dedecms下面生成Google Sitemap的方法