Opened 16 years ago

Closed 13 years ago

#10907 closed New feature (fixed)

Adding google news sitemap support to django.contrib.sitemaps

Reported by: Lakin Wecker Owned by: Lakin Wecker
Component: contrib.sitemaps Version: 1.0
Severity: Normal Keywords:
Cc: msimoens Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Google News Sitemaps are very similar to normal sitemaps in that they build off of the sitemaps protocol. They add a new namespace to the xml file, along with some added news-specific attributes to eatch url.

This patch adds support for generation of these news sitemaps to the django.contrib.sitemaps application.

There were no tests for this package - so I have not added any news tests. I have however, made an attempt to update the documentation for sitemaps.

Attachments (1)

news_sitemaps.diff (9.8 KB ) - added by Lakin Wecker 16 years ago.
Fixed the bugs.

Download all attachments as: .zip

Change History (11)

comment:1 by anonymous, 16 years ago

It looks like you left a bit of hard-coded data on line 14 of django/contrib/sitemaps/templates/news_sitemap.xml

{% if url.keywords %}<news:keywords>Business, Mergers, Acquisitions</news:keywords>{% endif %} 

comment:2 by msimoens, 16 years ago

Cc: msimoens added

comment:3 by Lakin Wecker, 16 years ago

Owner: changed from nobody to Lakin Wecker
Status: newassigned

There are a couple of small bugs that i discovered this morning - working through those now.

by Lakin Wecker, 16 years ago

Attachment: news_sitemaps.diff added

Fixed the bugs.

comment:4 by Lakin Wecker, 16 years ago

Ok, those bugs have been ferretted out.

comment:5 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:6 by ChrisL, 15 years ago

Ticket patch not updated.

I'm implementing this patch and can see the <news:keywords> content is still in place. Should read:

{% if url.keywords %}<news:keywords>

{% for keyword in keywords %}{{ url.keyword }}{% if not forloop.last %}, {% endif %}{% endfor %}

</news:keywords>{% endif %}

can't get the news sitemap content to pass through to the template correctly, likely this was part of the bugs that were cleaned up?

Please post the up to date patch.

comment:7 by Timothée Peignier <timothee.peignier@…>, 15 years ago

There also a mobile sitemap format existing, see : http://www.google.com/support/webmasters/bin/answer.py?answer=34648&hl=en

comment:8 by Gabriel Hurley, 14 years ago

Component: Contrib appscontrib.sitemaps

comment:9 by Chris Beaven, 14 years ago

Severity: Normal
Type: New feature

comment:10 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: assignedclosed

In [16474]:

Fixed #10907, #14190 and #15829 -- Pass item to sitemaps template to allow further customization like Google News enabled sitemaps. Thanks, manfre and lakinwecker.

Note: See TracTickets for help on using tickets.
Back to Top