Django

Code

Changeset 4088

Show
Ignore:
Timestamp:
11/20/06 10:32:40 (2 years ago)
Author:
adrian
Message:

Fixed #3033 -- Extended django.contrib.sitemaps to support new, generic sitemap protocol rather than Google's proprietary version. Thanks, Petar Marić

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/sitemaps/templates/sitemap_index.xml

    r3869 r4088  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84"> 
     2<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemapindex/0.9"> 
    33{% for location in sitemaps %}<sitemap><loc>{{ location|escape }}</loc></sitemap>{% endfor %} 
    44</sitemapindex> 
  • django/trunk/django/contrib/sitemaps/templates/sitemap.xml

    r3869 r4088  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> 
     2<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
    33{% spaceless %} 
    44{% for url in urlset %} 
  • django/trunk/docs/sitemaps.txt

    r3699 r4088  
    66 
    77Django comes with a high-level sitemap-generating framework that makes 
    8 creating `Google Sitemap`_ XML files easy. 
    9  
    10 .. _Google Sitemap: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html 
     8creating sitemap_ XML files easy. 
     9 
     10.. _sitemap: http://www.sitemaps.org/ 
    1111 
    1212Overview 
     
    5656This tells Django to build a sitemap when a client accesses ``/sitemap.xml``. 
    5757 
    58 The name of the sitemap file is not important, but the location is. Google will 
    59 only index links in your sitemap for the current URL level and below. For 
    60 instance, if ``sitemap.xml`` lives in your root directory, it may reference any 
    61 URL in your site. However, if your sitemap lives at ``/content/sitemap.xml``, 
    62 it may only reference URLs that begin with ``/content/``. 
     58The name of the sitemap file is not important, but the location is. Search 
     59engines will only index links in your sitemap for the current URL level and 
     60below. For instance, if ``sitemap.xml`` lives in your root directory, it may 
     61reference any URL in your site. However, if your sitemap lives at 
     62``/content/sitemap.xml``, it may only reference URLs that begin with 
     63``/content/``. 
    6364 
    6465The sitemap view takes an extra, required argument: ``{'sitemaps': sitemaps}``. 
     
    200201 
    201202Example values for ``priority``: ``0.4``, ``1.0``. The default priority of a 
    202 page is ``0.5``. See Google's documentation for more documentation
    203  
    204 .. _Google's documentation: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html 
     203page is ``0.5``. See the `sitemaps.org documentation`_ for more
     204 
     205.. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef 
    205206 
    206207Shortcuts