Как сделать так, чтобы карта сайта обновлялась после внесения изменений?
Я использую Django sitemap framework для генерации карты сайта, и она работает, но я внес некоторые изменения, и моя карта сайта не была сгенерирована заново.
Вот моя карта сайта, которая генерируется:
class StaticViewSitemap(Sitemap):
protocol = "https"
changefreq = "monthly"
priority = 1
def items(self):
return ['home']
def location(self, item):
return reverse(item)
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.io/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/enterprise/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/about/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/pricing/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/posts/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
</urlset>
Однако, я сделал некоторые изменения, я удалил некоторые ссылки, но моя карта сайта все еще отображает старые ссылки.
class StaticViewSitemap(Sitemap):
protocol = "https"
changefreq = "monthly"
priority = 1
def items(self):
return ['home','enterprise','about','pricing']
def location(self, item):
return reverse(item)
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.io/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/enterprise/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/about/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/pricing/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://example.io/posts/</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
</urlset>
<