Documentation
PageGraph declares SEO on each TanStack route and derives the head, sitemap, robots.txt, JSON-LD and CI checks from that one declaration.
PageGraph is an npm library for route-declared SEO in TanStack Start and TanStack Router. Each route declares its SEO policy and head once, in staticData.seo. The <head>, sitemap, robots.txt, breadcrumbs, JSON-LD, cross-links and the CI check all derive from that declaration, so there are no files to keep in sync by hand.
The pagegraph() Vite plugin builds a graph from your routes inside your app's own Vite pipeline. The pagegraph CLI reads the same graph, so pagegraph check can fail a build when a declaration is broken. With the opt-in coverage gate, a page in an enforced route group that declares neither staticData nor head fails the build.
Where to go
Tutorial
- Quick start: add PageGraph to an existing TanStack Start app and run
pagegraph check.
How-to guides
- Gate CI with pagegraph check
- Add per-page Open Graph images
- Publish Markdown twins and llms.txt
- Enforce route coverage in Vite
- Check contextual links
- Gate claims in page copy
- Run agent workflows
- Audit any website
- Use PageGraph without TanStack Start