28.3 Sitemaps

A sitemap is a list of all the webpages that a search engine should know about. Originally proposed by Google, the idea is that we can tell Google where all our pages are and rank them by importance so that Google can best determine what to show users searching the web or our site.

Technically, the ability to provide sitemaps is an app in the Django contributed library, and this content actually belongs in Part II. However, we don’t want to build sitemaps until the very last moment before we deploy, and so I’ve bent the rules a little.

To begin, we therefore need to add the sitemaps app to our INSTALLED_APPS list, as shown in Example 28.21.

Example 28.21: Project Code

suorganizer/settings.py in b1f09978d6

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.