forked from 00dani/lemoncurry
Add a simple sitemap using django.contrib.sitemaps - there aren't a lot of pages to map so far so it's pretty basic ;)
This commit is contained in:
parent
f5f4a1d03f
commit
501c91bd12
3 changed files with 28 additions and 3 deletions
12
home/sitemaps.py
Normal file
12
home/sitemaps.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from django.contrib import sitemaps
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
class HomeSitemap(sitemaps.Sitemap):
|
||||
changefreq = 'daily'
|
||||
|
||||
def items(self):
|
||||
return ('home:index',)
|
||||
|
||||
def location(self, item):
|
||||
return reverse(item)
|
Loading…
Add table
Add a link
Reference in a new issue