Skip to content

feat: publish sitemap dates, titles, and robots.txt - #6197

Merged
yanglbme merged 1 commit into
docsfrom
seo-sitemap
Oct 17, 2026
Merged

yanglbme merged 1 commit into
docsfrom
seo-sitemap

Conversation

@yanglbme

Copy link
Copy Markdown
Member

Summary

  • Add a root robots.txt that lists the Chinese and English sitemaps and keeps crawlers off the in-site search index.
  • Name each LeetCode range index after its number range so the HTML title matches the page heading.
  • Set sitemap lastmod from the source README's last commit instead of the build date. Range indexes use the newest problem in that range.

Type

  • New solution
  • Update solution
  • Docs
  • Other

Checklist

For new or updated solutions:

  • README.md / README_EN.md follow solution/template.md
  • If a Thinking block is added, it sits after the method heading, is non-empty, and matches the code in the repo (naive idea vs constraints, bottleneck, key observation, why this method). Thinking is optional.
  • All languages implement the same algorithm; unrelated Solution.* files and code tabs are unchanged
  • Code is formatted as described in AGENTS.md

Test plan

  • python -m unittest tests.test_build_site tests.test_revision_date tests.test_stay_on_page tests.test_conditional_mathjax tests.test_thinking_block tests.test_ext_info -v
  • After deploy, /robots.txt returns 200 and lists both sitemaps
  • /lc/0000-0099/ title is the range label, and /sitemap.xml lastmod values are not all the build date

Made with Cursor

Range index pages all shared one title, and sitemap lastmod was the build date because flattened pages are untracked.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@idoocs idoocs added core team Issues or pull requests from core team py Issues or Pull requests relate to .py code txt yml Issues or Pull requests relate to .yml files labels Oct 17, 2026
@yanglbme
yanglbme merged commit d5945cf into docs Oct 17, 2026
2 checks passed
@yanglbme
yanglbme deleted the seo-sitemap branch October 17, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core team Issues or pull requests from core team py Issues or Pull requests relate to .py code txt yml Issues or Pull requests relate to .yml files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants