Opened 7 years ago

Last modified 7 years ago

#8485 assigned enhancement

[PATCH] Some improvements to GoogleSitemapPlugin

Reported by: Mitar Owned by: Martin Scharrer
Priority: normal Component: GoogleSitemapPlugin
Severity: normal Keywords:
Cc: Mitar, Myroslav Opyr Trac Release: 0.11


I am attaching a patch with some improvements to GoogleSitemapPlugin:

  • check if user accessing sitemap.xml has permissions to access given resources (we do not want to leak to Google (or others) information about internal/hidden pages)
  • if Trac component is disabled in configuration GoogleSitemapPlugin should not issue entries for it
  • added entries for ContactFormPlugin and FullBlogPlugin (this should probably be implemented through extension point in the future)
  • added many other entries (realms): milestones, reports, attachments...
  • added prioritization of entries, so for example you can configure GoogleSitemapPlugin to prioritize top-level wiki pages (like section pages)

Attachments (1)

googlesitemap.patch (10.3 KB) - added by Mitar 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Mitar

Attachment: googlesitemap.patch added

comment:1 Changed 7 years ago by Martin Scharrer

Status: newassigned

Looks nice! I will add it as soon I have the time.

comment:2 Changed 7 years ago by Myroslav Opyr

Cc: Myroslav Opyr added

I've reviewed the code. I do like following enhancements:

  • Disabling component in sitemap if it is not enabled in trac
  • Excluding entries that are not accessible due to access restrictions
  • Consistent use of self.env.abs_href
  • Inclusion of milestones and attachments

But I still don't think that following options are ready to be included in Plugin AS IS:

  • Wiki pages priorities (code too complex/"dirty")
  • Inclusion of timeline and reports (content is duplicated, and of no value for search engine), browser (single page, is no value for Search Engine)
  • Support for 3rd party plugins

I do agree that 3rd party plugins does need extension points. For instance if there would be proper extension point we'd include Bitten Builds in sitemap, as it is often valuable resource for developers seeking for errors. Bitten Build containing an error will reveal the way error was fixed.

comment:3 Changed 7 years ago by Mitar

Please check the latest version on Bitbucket.

I do not agree that inclusion of timeline, reports or browser pages are of no value. Only top-level content is included. The reason for this is that search engine can get a better understanding of page structure.

Feel free to send me pull requests on Bitbucket with improvements and I would be glad to pull them in.

Modify Ticket

Change Properties
Set your email in Preferences
as assigned The owner will remain Martin Scharrer.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.