Opened 7 years ago

Closed 5 years ago

#12347 closed New feature (fixed)

Adds support to urllist.txt in django.contrib.sitemaps

Reported by: afurlan Owned by: Jannis Leidel
Component: contrib.sitemaps Version: 1.1
Severity: Normal Keywords: contrib, sitemaps, urllist
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


The Yahoo! Search Engine/Crawler supports some different types of sitemaps. Because of that, I use to always have two types of sitemaps available in my sites: sitemap.xml and urllist.txt. While the first one (sitemap.xml) is supported by Django, the last one (urllist.txt) isn't, so I'm adding a patch that adds support to it in the django.contrib.sitemaps application.

My patch takes advantages of the current Sitemap framework and uses the same configuration of django.contrib.sitemaps.views.sitemap to create the urllist.txt file. Once you have your sitemap.xml configured:

    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),

you can add support to urllist.txt by just adding the following rule:

    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
    (r'^urllist.txt$', 'django.contrib.sitemaps.views.urllist', {'sitemaps': sitemaps}),

This patch is currently running on my blog: sitemap.xml and urllist.txt.

Attachments (1)

sitemaps-urllist.patch (1.2 KB) - added by afurlan 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by afurlan

Attachment: sitemaps-urllist.patch added


comment:1 Changed 7 years ago by afurlan

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to afurlan
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 7 years ago by afurlan

Owner: afurlan deleted
Status: assignednew

comment:3 Changed 7 years ago by Jannis Leidel

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedDesign decision needed

comment:4 Changed 6 years ago by Gabriel Hurley

Component: Contrib appscontrib.sitemaps

comment:5 Changed 6 years ago by Matt McClanahan

Severity: Normal
Type: New feature

comment:6 Changed 5 years ago by Jannis Leidel

Easy pickings: unset
Summary: [PATCH] Adds support to urllist.txt in django.contrib.sitemapsAdds support to urllist.txt in django.contrib.sitemaps
UI/UX: unset

comment:7 Changed 5 years ago by Jannis Leidel

Owner: set to Jannis Leidel
Resolution: fixed
Status: newclosed

In [16475]:

Fixed #12347 -- Added a mimetype option to sitemaps views to further customize the output of the view, e.g. to support Yahoo's plain text urllist format. Thanks, afurlan.

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