比这篇新的文章: 判断素数
比这篇旧的文章: Javascript - 后台窗口来消息时标题栏闪烁

Movable Type生成sitemap.xml的模板

语言: XML, 标签: template mt sitemap 2009/04/17发布 11个月前更新 更新记录
作者: liufeng, 点击408次, 评论(0), 收藏者(0), , 打分:

背景
主题: 字体:
001 <?xml version="1.0" encoding="UTF-8"?>
002 <!--
003     Canonical sitemap.xml template v0.8
004     ### START SETUP
005     Possible values for the frequency variables are:
006    
007     always
008     hourly
009     daily
010     weekly
011     monthly
012     yearly
013     never
014    
015     "always" should be used to describe documents that change each time they are accessed.
016     "never" should be used to describe archived URLs.
017 -->
018
019 <$MTSetVar name="home-frequency" value="daily"$>
020 <$MTSetVar name="category-frequency" value="weekly"$>
021 <$MTSetVar name="current-monthly-frequency" value="daily"$>
022 <$MTSetVar name="past-monthly-frequency" value="never"$>
023 <$MTSetVar name="current-weekly-frequency" value="daily"$>
024 <$MTSetVar name="past-weekly-frequency" value="never"$>
025 <$MTSetVar name="current-daily-frequency" value="hourly"$>
026 <$MTSetVar name="past-daily-frequency" value="never"$>
027 <$MTSetVar name="recent-entry-frequency" value="hourly"$>
028 <$MTSetVar name="past-entry-frequency" value="monthly"$>
029 <$MTSetVar name="page-frequency" value="weekly"$>
030
031 <!--
032     Values for priority range from 0.0 to 1.0 and reflect the relative importance of pages within your site.
033     Do not set these all to a high value, as that's no different from setting them all to 0.0.
034     This does not affect how your pages are compared to other sites'.
035 -->
036
037 <$MTSetVar name="home-priority" value="1.0"$>
038 <$MTSetVar name="category-priority" value="0.8"$>
039 <$MTSetVar name="monthly-priority" value="0.6"$>
040 <$MTSetVar name="weekly-priority" value="0.4"$>
041 <$MTSetVar name="daily-priority" value="0.2"$>
042 <$MTSetVar name="entry-priority" value="1.0"$>
043 <$MTSetVar name="page-priority" value="1.0"$>
044 <!-- ### END SETUP -->
045
046 <urlset
047     xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
048     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
049     xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
050         http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
051     <url>
052     <!-- ### This is your blog's homepage -->
053         <loc><$MTBlogURL encode_xml="1"$></loc>
054         <changefreq><$MTGetVar name="home-frequency"$></changefreq>
055         <priority><$MTGetVar name="home-priority"$></priority>
056     </url>
057
058     <!-- ### START CATEGORY ARCHIVES -->
059     <MTIfArchiveTypeEnabled archive_type="Category">
060         <MTCategories>
061             <url>
062                 <loc><$MTCategoryArchiveLink encode_xml="1"$></loc>
063                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
064                 <changefreq><$MTGetVar name="category-frequency"$></changefreq>
065                 <priority><$MTGetVar name="category-priority"$></priority>
066             </url>
067         </MTCategories>
068     </MTIfArchiveTypeEnabled>
069     <!-- ### END CATEGORY ARCHIVES -->
070
071     <!-- ### START MONTHLY ARCHIVES -->
072     <MTIfArchiveTypeEnabled archive_type="Monthly">
073         <MTArchiveList archive_type="Monthly" lastn="1">
074             <url>
075                 <!--  ### The current month is still being updated. -->
076                 <loc><$MTArchiveLink encode_xml="1"$></loc>
077                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
078                 <changefreq><$MTGetVar name="current-monthly-frequency"$></changefreq>
079                 <priority><$MTGetVar name="monthly-priority"$></priority>
080             </url>
081         </MTArchiveList>
082         <MTArchiveList archive_type="Monthly" lastn="9999" offset="1">
083             <url>
084                 <!--  ### Past months are just archived. -->
085                 <loc><$MTArchiveLink encode_xml="1"$></loc>
086                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
087                 <changefreq><$MTGetVar name="past-monthly-frequency"$></changefreq>
088                 <priority><$MTGetVar name="monthly-priority"$></priority>
089             </url>
090         </MTArchiveList>
091     </MTIfArchiveTypeEnabled>
092     <!-- ### END MONTHLY ARCHIVES -->
093
094     <!-- ### START WEEKLY ARCHIVES -->
095     <MTIfArchiveTypeEnabled archive_type="Weekly">
096         <MTArchiveList archive_type="Weekly" lastn="1">
097             <url>
098         <!--  ### The current week is still being updated. -->
099                 <loc><$MTArchiveLink encode_xml="1"$></loc>
100                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
101                 <changefreq><$MTGetVar name="current-weekly-frequency"$></changefreq>
102                 <priority><$MTGetVar name="weekly-priority"$></priority>
103             </url>
104         </MTArchiveList>
105         <MTArchiveList archive_type="Weekly" lastn="9999" offset="1">
106             <url>
107         <!--  ### Past weeks are just archived. -->
108                 <loc><$MTArchiveLink encode_xml="1"$></loc>
109                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
110                 <changefreq><$MTGetVar name="past-weekly-frequency"$></changefreq>
111                 <priority><$MTGetVar name="weekly-priority"$></priority>
112             </url>
113         </MTArchiveList>
114     </MTIfArchiveTypeEnabled>
115     <!-- ### END WEEKLY ARCHIVES -->
116             
117     <!-- ### START DAILY ARCHIVES -->
118     <MTIfArchiveTypeEnabled archive_type="Daily">
119         <MTArchiveList archive_type="Daily" lastn="1">
120             <url>
121                 <!--  ### The current day is still being updated. -->
122                 <loc><$MTArchiveLink encode_xml="1"$></loc>
123                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
124                 <changefreq><$MTGetVar name="current-daily-frequency"$></changefreq>
125                 <priority><$MTGetVar name="daily-priority"$></priority>
126             </url>
127         </MTArchiveList>
128         <MTArchiveList archive_type="Daily" lastn="9999" offset="1">
129             <url>
130                 <!--  ### Past days are just archived. -->
131                 <loc><$MTArchiveLink encode_xml="1"$></loc>
132                 <lastmod><MTEntries lastn="1"><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></lastmod>
133                 <changefreq><$MTGetVar name="past-daily-frequency"$></changefreq>
134                 <priority><$MTGetVar name="daily-priority"$></priority>
135             </url>
136         </MTArchiveList>
137     </MTIfArchiveTypeEnabled>
138     <!-- ### END DAILY ARCHIVES -->
139     
140     <!-- ### START INDIVIDUAL ARCHIVES -->
141     <MTIfArchiveTypeEnabled archive_type="Individual">
142         <MTEntries lastn="10">
143             <url>
144             <!--  ### The recent items you post are more likely to be active(comments, etc) than older ones. -->
145                 <loc><$MTEntryPermalink encode_xml="1"$></loc>
146                 <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
147                 <changefreq><$MTGetVar name="recent-entry-frequency"$></changefreq>
148                 <priority><$MTGetVar name="entry-priority"$></priority>
149             </url>
150         </MTEntries>
151         <MTEntries lastn="999999" offset="10">
152             <url>
153             <!--  ### And the rest of them. -->
154                 <loc><$MTEntryPermalink encode_xml="1"$></loc>
155                 <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
156                 <changefreq><$MTGetVar name="past-entry-frequency"$></changefreq>
157                 <priority><$MTGetVar name="entry-priority"$></priority>
158             </url>
159         </MTEntries>
160     </MTIfArchiveTypeEnabled>
161     <!-- ### END INDIVIDUAL ARCHIVES -->
162     
163     <!-- ### START PAGE ARCHIVES ### -->
164     <MTIfArchiveTypeEnabled archive_type="Page">
165         <MTPages>
166             <url>
167                 <loc><$MTPagePermalink encode_xml="1"$></loc>
168                 <lastmod><$MTPageModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
169                 <changefreq><$MTGetVar name="page-frequency"$></changefreq>
170                 <priority><$MTGetVar name="page-priority"$></priority>
171             </url>
172         </MTPages>
173     </MTIfArchiveTypeEnabled>
174     <!-- ### END PAGE ARCHIVES ### -->
175 </urlset>


所有评论,共0条:( 我也来说两句)


发表评论

注册登录后再发表评论