Dedecms in the HTML and XML format of Web site map Sitemap Making method

Source: Internet
Author: User

A Sitemap is a list of pages on the site. Creating and submitting a Sitemap helps Baidu find and understand all of the pages on your site, including pages that Baidu may not find through traditional crawl methods. You can also use the Sitemap to provide other information about your site, such as the last update date, the update frequency of the sitemap file, etc., for the Baidu (Google) spider Reference.

Baidu (Google) has submitted data that is not guaranteed to crawl and index all URLs. However, Baidu (Google) will use the data in the Sitemap to understand the structure of the site and other information, this can help Baidu improve the crawl strategy, and in the future to better crawl the site. In addition, Sitemaps are not related to search rankings.

A Making of dedecms sitemap.html of weaving Dream

Here we build with the label of the weaving Dream

But the generated path is in the/data directory, we usually put it under the root directory, so change the file:

Here's how:

First step: Open/dede/makehtml_map.php

if ($dopost = = "Site")

{

$murl = $cfg _cmspath. " /data/sitemap.html "; Content from the Weaving Dream template group

$tmpfile = $cfg _basedir. $cfg _templets_dir. " /plus/sitemap.htm ";

}

Change to become

if ($dopost = = "Site")

{

$murl = $cfg _cmspath. " /sitemap.html ";

$tmpfile = $cfg _basedir. $cfg _templets_dir. " /plus/sitemap.htm ";

}

This will enable the sitemap.html to be placed in the root directory.

The sitemap template file is \templets\plus\sitemap.htm and can be defined by modifying the style

can refer to my this page http://www.bdf029.cn/sitemap.html, the style is also in the page head, but with the dream of {Dede:global name= ' maplist '/} generated only two levels of directory, In the back I will create an infinite level of methods to paste out for everyone's reference.

Two Making of dedecms sitemap.xml of weaving Dream

<?xml version= "1.0" encoding= "UTF-8"?>
<urlset xmlns= "http://www.google.com/schemas/sitemap/0.84" >
<url>
<loc>{dede:global.cfg_basehost/}</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= ' type= ' top '}
<url>
<loc>[field:typelink/]</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
{/dede:channel}
{dede:arclist row=2000 orderby=pubdate}
<url>
<loc>[field:arcurl/]</loc>
<lastmod>[field:pubdate function=strftime ('%y-%m-%d ', @me)/]</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
{/dede:arclist}
</urlset>

Save the above file as a template file, such as gsitemap.htm, in the template directory under Templets/plus

And then weave a dream backstage operation

Add a list in the

According to the settings, note that the "unlimited" there first casually select, save and then modify to "unlimited", and then "Update", Generate files.

Here are two questions:

1. Generate columns and articles links such as/npx,/a/npx/2014/0829/447.html, etc., no domain name, this issue from the background = "Core Settings =" and then open support multi-site

2. Generate a lot of sitemap.xml, this problem like change

This is where the HTML and XML-formatted sitemap is created.

Original link: http://www.arangda.com/11.html

Web Site Map Sitemap Authoring method in HTML and XML format in the Dedecms of Dreams

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.