Skip to content

Conversation

@sarahboyce
Copy link
Contributor

@sarahboyce sarahboyce commented Oct 21, 2025

I have included the commits from #2262 so that if someone pulls the branch they get a better picture, only the last 2 commits (3f4b174 and 932d8ce) is new.

Fixes #1499

Screenshot from 2025-10-23 15-40-18

Note that some changes will be removed once #2136 is merged.

If we are happy with this approach then I may remove _sync_blog_to_db, _sync_views_to_db, SearchableView and SEARCHABLE_VIEWS added in #2136.
If we need a "docs only but includes some website pages" filter we can add that in later on, but I can add logic for this if it's a blocker for this change

For testing, recommend running python manage.py update_docs --force --language=en dev
Be aware you will get more extensive search results if #2276 is merged

@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 +239
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
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