Skip to content

Generate sitemaps XML#108

Draft
nuno-agostinho wants to merge 1 commit intomainfrom
sitemaps
Draft

Generate sitemaps XML#108
nuno-agostinho wants to merge 1 commit intomainfrom
sitemaps

Conversation

@nuno-agostinho
Copy link
Copy Markdown
Member

@nuno-agostinho nuno-agostinho commented Oct 8, 2025

Google already crawls the website pretty well. What is the point of having a quite manual way to do this? Not as dynamic as I would have hoped for: new Cell Atlas and Database Entry sections need to be included manually (unless we find a non-built-in way to automate it).

Also, /api/ crawling is now discouraged by robots.txt.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
app/sitemaps.py 73.68% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread app/sitemaps.py
from django.urls import reverse
from . import models

class AtlasSitemap(Sitemap):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
class AtlasSitemap(Sitemap):
class AtlasSitemap(Sitemap):

Comment thread app/sitemaps.py

class AtlasSitemap(Sitemap):
"""Sitemap for Cell Atlas pages."""
changefreq = "weekly"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
changefreq = "weekly"
changefreq = "weekly"

Comment thread app/sitemaps.py

def location(self, obj):
"""Return the URL for the main page of a species."""
return reverse('atlas_info', args=[obj.slug])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
return reverse('atlas_info', args=[obj.slug])
return reverse("atlas_info", args=[obj.slug])

Comment thread app/sitemaps.py

class StaticViewSitemap(Sitemap):
"""Sitemap for static pages."""
changefreq = "monthly"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
changefreq = "monthly"
changefreq = "monthly"

Comment thread app/sitemaps.py
priority = 0.5

def items(self):
return ['atlas', 'downloads', 'about', 'entry', 'reference', 'api']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
return ['atlas', 'downloads', 'about', 'entry', 'reference', 'api']
return ["atlas", "downloads", "about", "entry", "reference", "api"]

Comment thread app/sitemaps.py
return ['atlas', 'downloads', 'about', 'entry', 'reference', 'api']

def location(self, item):
return reverse(item) No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
return reverse(item)
return reverse(item)

Comment thread app/urls.py
Comment on lines +13 to +14
'static': StaticViewSitemap,
'dataset': AtlasSitemap,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
'static': StaticViewSitemap,
'dataset': AtlasSitemap,
"static": StaticViewSitemap,
"dataset": AtlasSitemap,

Comment thread app/urls.py
Comment on lines +129 to +130
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='sitemap'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Super-Linter] reported by reviewdog 🐶

Suggested change
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='sitemap'),
path("sitemap.xml", sitemap, {"sitemaps": sitemaps}, name="sitemap"),

@nuno-agostinho nuno-agostinho added the enhancement Improvements to existing features label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant