feat: add archive sitemaps for best-of pages#3784
Conversation
Add two new sitemap endpoints for archive best-of pages:
- /sitemaps/archive-index.xml: index pages per tag/source (/tags/{tag}/best-of, /sources/{source}/best-of)
- /sitemaps/archive-pages.xml: individual archive pages with year/month URLs
Both are registered in the sitemap index. Source archives resolve the
source handle via join; global archives are excluded. Months are
zero-padded.
|
🍹 The Update (preview) for dailydotdev/api/prod (at 6b34d19) was successful. ✨ Neo ExplanationRoutine deployment promoting commit `6b34d199` to production — all workloads (deployments and cron jobs) get the new image, and fresh DB + Clickhouse migration Jobs are queued to run. ✅ Low RiskThis is a standard application deployment rolling out a new image version ( The migration Jobs follow the expected pattern: old migration Jobs from the previous release are deleted and new ones are created for the incoming commit. Both a Postgres ( 🔵 Info — The GCP provider warning about missing ADC credentials is cosmetic for this update; it only affects GCP resource operations, not the Kubernetes changes being applied here. Resource Changes Name Type Operation
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-channel-digests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-history-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-expired-better-auth-sessions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-monthly-best-post-archives-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-clickhouse-migration-bfa6c400 kubernetes:batch/v1:Job delete
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-achievement-rarity-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-materialized-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-weekly-quests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-squad-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-4df26e56 kubernetes:batch/v1:Job create
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-worker-job-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
... and 11 other changes |
The sitemap spec allows up to 50k URLs per file. No need to split into smaller pages.
Replace the single archive-pages.xml with paginated sub-sitemaps split by scope type (tag/source) and period type (month/year), each containing at most 10,000 URLs. The sitemap index now dynamically lists all archive page sitemaps based on actual archive counts. Route: /archive-pages-:scopeType-:periodType-:page.xml (0-indexed)
Summary
/sitemaps/archive-index.xmlendpoint listing all tag/source best-of index pages (/tags/{tag}/best-of,/sources/{source}/best-of) for every tag/source that has at least one archive/sitemaps/archive-pages.xmlendpoint listing individual archive pages (/tags/{tag}/best-of/{year}/{month},/tags/{tag}/best-of/{year}, and equivalent source URLs)/sitemaps/index.xmlscopeIdto the sourcehandlevia join; archives for deleted/missing sources are excludedTest plan