Skip to content

Conversation

@sarahboyce
Copy link
Contributor

@sarahboyce sarahboyce commented Oct 21, 2025

Fixes #1499

This PR enables the whole website to be searched.
If anything is missing from the search, it is missing from a sitemap. Going forward we should make sure pages we want to be searched are included in our sitemaps.

Screenshot from 2025-11-22 08-32-44

For testing, recommend running python manage.py update_docs --force --language=en dev
On deployment we should run the first one with --force. We may want to run python manage.py update_docs --force --language=en dev (ie. english dev with force) on production every month to update existing searchable website content. Existing website content (static pages, old blog posts) are mostly static so we don't need to run with force very often

@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 2 times, most recently from 17fef8d to ca7b952 Compare October 21, 2025 18:55
Comment on lines +234 to +237
if force:
Document.objects.filter(
metadata__parents=DocumentationCategory.WEBSITE
).delete()
Copy link
Contributor Author

@sarahboyce sarahboyce Oct 22, 2025

Choose a reason for hiding this comment

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

In future we could add a last_modified field to Document and check the sitemap last modified and make updates according to this.
But for now, I think having a cron job to build the English dev docs with force (update_docs --force --language=en dev) running every 2 weeks (or even every month) will be good enough to update changes to the webiste pages for search and remove any stale pages. This content doesn't change very often, nor do we remove content often

@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 4 times, most recently from 8020f62 to 3f4b174 Compare October 22, 2025 07:32
@sarahboyce sarahboyce marked this pull request as ready for review October 22, 2025 07:50
@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 2 times, most recently from 3bd8c81 to 1e4380b Compare October 23, 2025 13:46
@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 2 times, most recently from 802b7f2 to e791d7d Compare November 16, 2025 18:07
@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 2 times, most recently from af94b04 to 4fc09dc Compare November 22, 2025 07:30
@sarahboyce sarahboyce requested a review from a team November 22, 2025 07:39
@sarahboyce sarahboyce force-pushed the sitemap-page-search branch 2 times, most recently from 6d7606a to 9ddbe9c Compare November 24, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site-wide search

1 participant