]> oss.titaniummirror.com Git - webber.git/blobdiff - plugins/google_sitemap.py
Merge branch 'upstream'
[webber.git] / plugins / google_sitemap.py
index a13bc8557cfbddfd866ecfc5635b65050917516f..e039e21d31a7eca278c436ff100cb2e033442868 100644 (file)
@@ -36,8 +36,14 @@ def write_initial(params):
 def sitemap_scan(params):
        global f
        file = params.file
+
+       # Ignore non-pages
        if not file.has_key("linktitle"):
                return
+       # Ignore hidden pages
+       if file.has_key("hide") and file.hide:
+               return
+
        if f is None:
                write_initial(params)
 
@@ -56,7 +62,7 @@ def sitemap_scan(params):
 
        #print file.sitemap_priority, file.sitemap_changefreq, file.rel_path
        f.write('<url>\n')
-       f.write('   <loc>http://%s/%s</loc>\n' % (file.main_url, file.rel_path))
+       f.write('   <loc>http://%s/%s</loc>\n' % (file.main_url, file.out_path))
        f.write('   <lastmod>%s</lastmod>\n' % time.strftime( "%Y-%m-%d", time.localtime(file.mtime)) )
        f.write('   <changefreq>%s</changefreq>\n' % file.sitemap_changefreq)
        f.write('   <priority>%s</priority>\n' % file.sitemap_priority)