Skip to content

sitemaps: add "recent" sitemap, use last-build-date instead of release date#3259

Open
syphar wants to merge 1 commit intorust-lang:mainfrom
syphar:recent-sitemap
Open

sitemaps: add "recent" sitemap, use last-build-date instead of release date#3259
syphar wants to merge 1 commit intorust-lang:mainfrom
syphar:recent-sitemap

Conversation

@syphar
Copy link
Member

@syphar syphar commented Mar 17, 2026

  • in case of rebuilds, we previously didn't update the dates in the sitemap, which means there weren't (quickly) re-crawled.
  • I saw some recommendation to provide a separate "recent" sitemap, which would make google crawl fresh or updated entries earlier.

@syphar syphar requested a review from a team as a code owner March 17, 2026 05:14
@syphar syphar self-assigned this Mar 17, 2026
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Mar 17, 2026
.map(|days| {
today
.checked_sub_days(Days::new(days))
.expect("underflow when building recent sitemap dates")
Copy link
Member

Choose a reason for hiding this comment

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

Instead of panicking, couldn't we return an error?

{
return Err(AxumNope::ResourceNotFound);
}
fn render_sitemap_item(item: SitemapItem) -> AxumResult<Bytes> {
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to call this function with SitemapItemXml directly?

if letter.len() != 1 {
return Err(AxumNope::ResourceNotFound);
} else if let Some(ch) = letter.chars().next()
&& !(ch.is_ascii_lowercase())
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the parens are needed after ! here, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants