How to create sitemaps¶
Sitemap¶
Sitemaps are XML files used by Google to index your website by using their Webmaster Tools and telling them the location of your sitemap.
The cms.sitemaps.CMSSitemap will create a sitemap with all the published pages of
your CMS.
Configuration¶
add
django.contrib.sitemapsto your project’sINSTALLED_APPSsettingadd
from cms.sitemaps import CMSSitemapto the top of your mainurls.pyadd
from django.contrib.sitemaps.views import sitemaptourls.py`add
url(r'^sitemap\.xml$', sitemap, {'sitemaps': {'cmspages': CMSSitemap}}),to yoururlpatterns
django.contrib.sitemaps¶
More information about django.contrib.sitemaps can be found in the official
Django documentation.