X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=plugins%2Fgoogle_sitemap.py;fp=plugins%2Fgoogle_sitemap.py;h=e039e21d31a7eca278c436ff100cb2e033442868;hb=b5bc4ffdfbaa76db7cd4cdeb078097ec17024f6b;hp=a13bc8557cfbddfd866ecfc5635b65050917516f;hpb=c6d30c7f18e835e0b99032d01b1f8acd7f077ec6;p=webber.git diff --git a/plugins/google_sitemap.py b/plugins/google_sitemap.py index a13bc85..e039e21 100644 --- a/plugins/google_sitemap.py +++ b/plugins/google_sitemap.py @@ -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('\n') - f.write(' http://%s/%s\n' % (file.main_url, file.rel_path)) + f.write(' http://%s/%s\n' % (file.main_url, file.out_path)) f.write(' %s\n' % time.strftime( "%Y-%m-%d", time.localtime(file.mtime)) ) f.write(' %s\n' % file.sitemap_changefreq) f.write(' %s\n' % file.sitemap_priority)