Skip to content

Create our own sitemap.xml #3

@jefftriplett

Description

@jefftriplett

We need to generate our own sitemap.xml for the new Django site so search engines (and tools like the old-post importer in scripts/fetch_old_posts.py) have an authoritative list of URLs.

Why

  • Related to Create redirects from old sitemap #1 (redirects from old sitemap) — once we have our own sitemap we can diff it against the legacy one to confirm every old URL has a redirect target.
  • SEO: give crawlers a canonical list of pages on the new site.

Suggested approach

  • Use Django's built-in django.contrib.sitemaps framework.
  • Add django.contrib.sitemaps to INSTALLED_APPS in config/settings.py.
  • Define Sitemap subclasses for each content type we want indexed (blog posts/announcements, event pages, static/flat pages).
  • Wire sitemap view into config/urls.py at /sitemap.xml.

Acceptance

  • GET /sitemap.xml returns a valid sitemap covering all public pages.
  • Sitemap is referenced from robots.txt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions