Skip to content

chore: port SEO audit skill from gitbook to Astro Starlight#21

Merged
rachaelrenk merged 2 commits intomainfrom
rachael/port-seo-audit-skill
May 5, 2026
Merged

chore: port SEO audit skill from gitbook to Astro Starlight#21
rachaelrenk merged 2 commits intomainfrom
rachael/port-seo-audit-skill

Conversation

@rachaelrenk
Copy link
Copy Markdown
Contributor

@rachaelrenk rachaelrenk commented May 4, 2026

Summary

Ports the docs-seo-audit skill from the gitbook repo to this Astro Starlight repo, removing all GitBook-specific logic and updating for the new content structure.

Context

The SEO audit skill runs as a scheduled Oz agent to scan docs.warp.dev for SEO issues (duplicate titles, missing descriptions, title length problems) and open PRs with fixes. It was previously configured for the gitbook repo's GitBook-based structure and needs updating for the Astro Starlight migration.

Changes

scripts/seo_audit.py

  • Replaced GitBook's 6-space SPACE_MAP + ROOT_SPACE_DIR with a single CONTENT_DIR = "src/content/docs" constant
  • Rewrote url_to_source_path() for Astro Starlight: tries .mdx then .md, uses index.mdx instead of README.md, no space-prefix stripping
  • Updated sitemap URL from /sitemap.xml to /sitemap-index.xml (Astro's default)
  • Added 308 redirect handler (Vercel serves 308s that Python's urllib doesn't follow by default)

SKILL.md

  • All SUMMARY.md references → src/sidebar.ts (sidebar config label property)
  • All gitbook repo rootdocs repo root
  • Updated all title exception file paths (e.g., docs/warp/terminal/windows/tabs.mdsrc/content/docs/terminal/windows/tabs.mdx)
  • Documented the frontmatter title + sidebar.label pattern as the preferred approach for fixing duplicate titles (keeps short nav labels while giving each page a unique SEO title)
  • Updated key principle Initial commit: open-sourcing Warp docs #1 to document title resolution precedence (frontmatter title > sidebar config label > slug-derived title)
  • Updated fixing examples to use { slug, label } syntax instead of markdown link text

references/gitbook-seo.mdreferences/starlight-seo.md

  • Renamed and rewrote with full title resolution precedence documentation and the sidebar label decoupling pattern

Validation

Ran the audit script with --max-pages 20 against the live site — URL→source-file mapping works correctly (e.g., https://docs.warp.dev/agent-platform/capabilities/src/content/docs/agent-platform/capabilities/index.mdx).

Out of scope

Recreating the scheduled Oz agent in the web app — will be done manually.


Oz conversation | Plan

Co-Authored-By: Oz oz-agent@warp.dev

- Update seo_audit.py URL-to-source-file mapping for src/content/docs/
  flat structure (.mdx, index.mdx instead of .md, README.md)
- Update sitemap URL to /sitemap-index.xml and add 308 redirect handling
- Rewrite SKILL.md: replace all SUMMARY.md refs with src/sidebar.ts,
  update file paths in title exceptions, document frontmatter
  title + sidebar.label pattern for fixing duplicate titles
- Rename references/gitbook-seo.md to starlight-seo.md and rewrite
  with full title resolution precedence documentation

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 4, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 5, 2026 5:18pm

Request Review

@rachaelrenk rachaelrenk self-assigned this May 4, 2026
- Delete gitbook-seo.md (superseded by starlight-seo.md)
- Update SKILL.md script paths from .warp/ to .agents/

Co-Authored-By: Oz <oz-agent@warp.dev>
@rachaelrenk rachaelrenk merged commit 1e7482a into main May 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants