From f759dac2c98372c8b27e2a18b942e653941b708d Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 20 Nov 2006 16:32:40 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20#3033=20--=20Extended=20django.contrib.?= =?UTF-8?q?sitemaps=20to=20support=20new,=20generic=20sitemap=20protocol?= =?UTF-8?q?=20rather=20than=20Google's=20proprietary=20version.=20Thanks,?= =?UTF-8?q?=20Petar=20Mari=C4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@4088 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/sitemaps/templates/sitemap.xml | 2 +- .../sitemaps/templates/sitemap_index.xml | 2 +- docs/sitemaps.txt | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/django/contrib/sitemaps/templates/sitemap.xml b/django/contrib/sitemaps/templates/sitemap.xml index ad24c045d40..16d9a0bbe04 100644 --- a/django/contrib/sitemaps/templates/sitemap.xml +++ b/django/contrib/sitemaps/templates/sitemap.xml @@ -1,5 +1,5 @@ - + {% spaceless %} {% for url in urlset %} diff --git a/django/contrib/sitemaps/templates/sitemap_index.xml b/django/contrib/sitemaps/templates/sitemap_index.xml index c89b192ecc1..9f39bb879f1 100644 --- a/django/contrib/sitemaps/templates/sitemap_index.xml +++ b/django/contrib/sitemaps/templates/sitemap_index.xml @@ -1,4 +1,4 @@ - + {% for location in sitemaps %}{{ location|escape }}{% endfor %} diff --git a/docs/sitemaps.txt b/docs/sitemaps.txt index fec65572f2b..7414567b166 100644 --- a/docs/sitemaps.txt +++ b/docs/sitemaps.txt @@ -5,9 +5,9 @@ The sitemap framework **New in Django development version**. Django comes with a high-level sitemap-generating framework that makes -creating `Google Sitemap`_ XML files easy. +creating sitemap_ XML files easy. -.. _Google Sitemap: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html +.. _sitemap: http://www.sitemaps.org/ Overview ======== @@ -55,11 +55,12 @@ URLconf_: This tells Django to build a sitemap when a client accesses ``/sitemap.xml``. -The name of the sitemap file is not important, but the location is. Google will -only index links in your sitemap for the current URL level and below. For -instance, if ``sitemap.xml`` lives in your root directory, it may reference any -URL in your site. However, if your sitemap lives at ``/content/sitemap.xml``, -it may only reference URLs that begin with ``/content/``. +The name of the sitemap file is not important, but the location is. Search +engines will only index links in your sitemap for the current URL level and +below. For instance, if ``sitemap.xml`` lives in your root directory, it may +reference any URL in your site. However, if your sitemap lives at +``/content/sitemap.xml``, it may only reference URLs that begin with +``/content/``. The sitemap view takes an extra, required argument: ``{'sitemaps': sitemaps}``. ``sitemaps`` should be a dictionary that maps a short section label (e.g., @@ -199,9 +200,9 @@ If it's an attribute, its value should be either a string or float representing the priority of *every* object returned by ``items()``. Example values for ``priority``: ``0.4``, ``1.0``. The default priority of a -page is ``0.5``. See Google's documentation for more documentation. +page is ``0.5``. See the `sitemaps.org documentation`_ for more. -.. _Google's documentation: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html +.. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef Shortcuts =========