Reputation: 6351
I have a website consist of many models and views already and over 25000 sub-urls. I need to create a sitemap but it is not easy to use django-sitemaps frameworks because we need to add each model.
Is there any easy way to create a sitemap for Django web-sites?
Upvotes: 0
Views: 298
Reputation: 111
If you are looking for a framework or a library in Django which automatically generate sitemap without manually adding entry in the model then you can definitely use jsl-django-sitemap library.
Salient features of this library:
Reference links
Credits: I have developed this library.
Upvotes: 0
Reputation: 19
Django sitemaps and wagtail sitemaps https://docs.wagtail.io/en/stable/reference/contrib/sitemaps.html does that. It processes all of your models. You can customize the sitemap class s well as the template. I use a docker container and customize the template and the code to for specific needs.
When I add a new blog, it automatically generates the entry.
https://www.fraydit.com/blogs/wagtail-sitemap-in-docker/
Here is an example of an implementation and customizing that module.
Upvotes: 1
Reputation: 22449
You could create a crawler (scrapy) to index your site, but tbh even with a lot of models it shouldn't be too hard to create a sitemap, have you run into any issues?
Upvotes: 0