Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: video sitemaps #2

Open
Terr opened this issue Dec 1, 2011 · 2 comments
Open

Suggestion: video sitemaps #2

Terr opened this issue Dec 1, 2011 · 2 comments

Comments

@Terr
Copy link

Terr commented Dec 1, 2011

Hi there,

First of all, thanks for the project. It was a breeze to implement :)

Because we also want to set up a video sitemap, I was thinking of modifying your project to support multiple types of sitemaps. Do you think that extended scope could be added to this project? (I am planning to make it available in a fork here in GitHub, of course)

If you think it's worthwhile to add to your repo, I'd like to discuss with you what the best approach of differentiating between types of sitemaps would be

@jsoa
Copy link
Member

jsoa commented Jan 11, 2012

Sounds interesting, I'd love to see your implementation of this.

@Terr
Copy link
Author

Terr commented Feb 28, 2012

My apologies for my extremely late reply. I wanted to document and update the tests to reflect my changes before presenting them, but I haven't found the time yet. I hope my explanation here is clear enough

The changed code can be found at my organization's fork: https://github.com/Sanoma-Media-Games/django-news-sitemaps

Two types of sitemaps have been added next to the regular NewsSitemap: VideoSitemap and Sitemap (for a regular list of URLs).

Depending on the inherited class of the registered sitemaps, a different XML template is rendered by views.render_sitemap() (was: news_sitemap()) for each sitemap with the extra fields requested by Google's sitemap specs.

Multiple sitemaps with different XML templates can still be rendered in one go, as long as all XML namespace declarations are present in header.xml

If you think these changes are suitable to be pulled into the main repository (even though the name 'django-news-sitemaps' wouldn't fully cover the functionality anymore), I'd be willing to update the docs and present it as a pull request :)

Any questions or comments are welcome, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants