Ticket #11693: 11693.diff

File 11693.diff, 1.3 KB (added by Tim Graham, 15 years ago)
  • docs/ref/contrib/sitemaps.txt

     
    5454To activate sitemap generation on your Django site, add this line to your
    5555:ref:`URLconf <topics-http-urls>`::
    5656
    57    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
     57   (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
    5858
    5959This tells Django to build a sitemap when a client accesses :file:`/sitemap.xml`.
    6060
     
    261261        # ...
    262262
    263263        # the sitemap
    264         (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
     264        (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
    265265    )
    266266
    267267.. _URLconf: ../url_dispatch/
     
    280280
    281281Here's what the relevant URLconf lines would look like for the example above::
    282282
    283    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps}),
     283   (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps}),
    284284   (r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
    285285
    286286This will automatically generate a :file:`sitemap.xml` file that references both
Back to Top