Session: rss-feed-and-sitemap — 2026-03-25

demo-blog-engine · branch feat/feeds · claude-sonnet-4-6 · 2026-03-25 10:00 · 3 msgs · 9 tools · 1 min read · updated 2 weeks ago

tools: Read, Write, Bash
← demo-blog-engine Download .md .txt .json
Tool calls
Write Write: 4 calls (44.4%) 4 Read Read: 3 calls (33.3%) 3 Bash Bash: 2 calls (22.2%) 2
Token usage32.4K total
Input4.8K
Cache creation7.2K
Cache read18.0K
Output2.4K
Cache hit ratio60%· warming up

Project: demo-blog-engine · Branch: feat/feeds · Mode: default · Model: claude-sonnet-4-6

Summary

Emitted public/rss.xml and public/sitemap.xml during the build. Both are pure string templates — no XML library needed — escaped via a tiny xml_escape helper. Added the feed URL to the <head> of every post page.

Conversation

Turn 1 — User

Add RSS 2.0 + sitemap.xml generation. Keep dependencies light.

Turn 1 — Assistant

Wrote src/feeds.rs with two functions:

  • build_rss(posts: &[Post]) -> String
  • build_sitemap(posts: &[Post], base_url: &str) -> String

Both return strings which main.rs writes to public/. Escaping goes through a tiny xml_escape function that handles <, >, &, ", '.

Tools used in this turn: - Write: src/feeds.rs (5-line preview) - Edit: src/main.rs — added feeds::build_rss call - Bash: cargo test — exit 0

Turn 2 — User

Ship it.

Turn 2 — Assistant

Committed. Added <link rel="alternate" type="application/rss+xml" href="/rss.xml"> to the post template.

Tools used in this turn: - Write: templates/post.html (5-line preview)

Connections

  • [[demo-blog-engine]] — project
  • [[RSS]] — concept
  • [[Sitemap]] — concept