Modify

Opened 3 years ago

Last modified 3 years ago

#8485 assigned enhancement

[PATCH] Some improvements to GoogleSitemapPlugin

Reported by: mitar Owned by: martin_s
Priority: normal Component: GoogleSitemapPlugin
Severity: normal Keywords:
Cc: mmitar@…, myroslav Trac Release: 0.11

Description

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 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by mitar

comment:1 Changed 3 years ago by martin_s

  • Status changed from new to assigned

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

comment:2 Changed 3 years ago by myroslav

  • Cc myroslav 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 3 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.

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.