Skip to content

add sitemap.xml generation - #866

Open
lazhenyi wants to merge 1 commit into
tokio-rs:masterfrom
lazhenyi:master
Open

add sitemap.xml generation#866
lazhenyi wants to merge 1 commit into
tokio-rs:masterfrom
lazhenyi:master

Conversation

@lazhenyi

Copy link
Copy Markdown

Description

Adds automatic sitemap.xml generation to the build process. The sitemap is generated at build time by scanning the content/
directory for all blog posts and documentation pages, outputting a valid XML sitemap to public/sitemap.xml.

Also adds a robots.txt to declare the sitemap location.

Changes

  • scripts/generate-sitemap.js — build script that walks content/blog/ and content/tokio/ to generate sitemap URLs (zero
    dependencies, uses only Node.js built-ins)
  • public/robots.txt — declares Sitemap: https://tokio.rs/sitemap.xml
  • package.json — adds build:sitemap script, runs before next build in both dev and build
  • .gitignore — excludes generated public/sitemap.xml

Type of Change

  • Infrastructure / build change

Checklist

  • npm run build succeeds
  • No new dependencies added
  • Sitemap auto-includes new .md files without config changes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant