mod: улучшено SEO

This commit is contained in:
2026-10-07 00:43:48 +03:00
parent 73b9ae4dd6
commit 4604f6923a
7 changed files with 569 additions and 49 deletions
+12
View File
@@ -1,6 +1,18 @@
from django.contrib.sitemaps import Sitemap
from django.urls import reverse
from .models import Post
class StaticViewSitemap(Sitemap):
"""Карта сайта для статических страниц (главная и др.)."""
priority = 1.0
changefreq = "daily"
def items(self):
return ['index']
def location(self, item):
return reverse(item)
class PostSitemap(Sitemap):
changefreq = "weekly" # Как часто меняются страницы
priority = 0.9 # Приоритет (от 0.0 до 1.0)