Edgewall Software

Ticket #1880 (new enhancement)

Opened 4 years ago

Last modified 2 years ago

Support for Google Sitemaps

Reported by: Martijn Pieters <mj@…> Owned by: jonas
Priority: normal Milestone: 1.0
Component: general Version: devel
Severity: normal Keywords:
Cc: ufs@…, werdlerk@…

Description

Google can index websites more efficiently and more frequently when a site provides information about the site in the form of a Google Sitemap; a centralized description of site content including information about change frequency and last update time.

Trac already has such information at the ready; all it needs to provide is the XML file itself and perhaps offer a few other niceties such as a sitemap index and automatic resubmission when pages change.

Trac could be extended to provide the following features:

Sitemap

 http://www.google.com/webmasters/sitemaps/docs/en/protocol.html

The sitemap lists every wiki page, roadmap milestone, changeset and ticket, with last-modification date. Perhaps the homepage of a trac project can be marked with a higher priority, and changesets can be marked with a changefreq tag set to 'never', while the timeline could marked as changing 'always'.

The spec leaves it open an what URL to present the map; it needs to be registered explicitly with Google the first time. However, it may be that in the future the file will be autodiscovered much like robots.txt is; by trying the /sitemap.gz URL. As such Trac should probably offer the sitemap under that URL; gzipping the generated content is easy enough.

Sitemaps Index

 http://www.google.com/webmasters/sitemaps/docs/en/protocol.html#sitemapLocation

In a multiproject configuration using TracModPython the ModPythonHandler could provide for a /sitemaps.gz URL that lists the sitemaps for all the Trac projects it knows about using a sitemapindex document.

Automatic resubmission

 http://www.google.com/webmasters/sitemaps/docs/en/submit.html#ping

Google allows for automatic notification of changes to sitemaps using a very simple HTTP GET API. Trac could automatically call this API whenever it learns of a change (wiki edits, ticket activity, etc.). This should be configurable, defaulting to 'off' as sitemaps have to be registered explicitly first (although there is no penalty for calling the API without having registered).

Attachments

Change History

Changed 4 years ago by Pedro Algarvio <ufs@…>

  • cc ufs@… added

Changed 4 years ago by Pedro Algarvio <ufs@…>

  • version changed from 0.8.4 to devel
  • milestone set to 1.0

I was going to ask about robots.txt, and then I found this ticket.

Guess this is the way to go.

I'm listening.

Changed 2 years ago by Koen Werdler <werdlerk@…>

  • cc werdlerk@… added

Changed 2 years ago by Koen Werdler <werdlerk@…>

This plugin made by  datenimperator creates a sitemap.xml:  http://www.trac-hacks.org/wiki/GoogleSitemapPlugin

I'm not sure if this is the most recent version since the developer has his own repository at his own website -  http://voidblog.de/wiki/GoogleSitemap .

Changed 2 years ago by Koen Werdler <werdlerk@…>

Correction; the links on trac-hacks.org already point to his own site.

Add/Change #1880 (Support for Google Sitemaps)

Author


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


Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from jonas. Next status will be 'new'
The owner will change from jonas to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.