Astro 5.x audit: site/og URL fix, Content Layer migration, Tailwind retirement - #16
Conversation
Astro site config was unset, so the production origin was hardcoded in three SEO surfaces, and pages passed site-relative seo.ogImage content values straight into og:image/twitter:image — invalid per the Open Graph spec and broken in link-preview scrapers. Set site, derive canonical and og URLs from Astro.site (byte-identical output for canonicals), and absolutize og/twitter images. Also: sitemap now sorts stories for deterministic output (content-layer ingest order is unstable across store rebuilds), chapters gain the same noindex filter guilds/stories already had, and the dead '/astro dev' argv branch is dropped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move src/content/config.ts to src/content.config.ts and replace legacy type:'data' collections with explicit glob() loaders scoped to '**/*.json' (matching the legacy data-extension matcher, so resources/README.md stays excluded). z now imports from astro/zod. Astro 6 removes the legacy emulation and old config location; all consumers already read entry.id and every filename is lowercase-kebab, so ids are unchanged — verified by a byte-identical dist build. Contract test path updated accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove the deprecated @astrojs/tailwind integration and the tailwindcss/postcss/autoprefixer devDependencies: utilities were unused (0 @apply, 0 @tailwind), so the only shipped effect was the integration's default-injected preflight, which gp-tokens' own reset layer supersedes. Hand-write the -webkit-backdrop-filter/-webkit-mask-image twins that autoprefixer previously generated (Safari < 18 blur support) and baseline the prefixed mask needle. Delete the dead BaseLayout.astro (unimported; last Tailwind-class consumer, stale GA tag) and the tailwind/postcss configs. Verified: dist CSS diff shows only preflight/prefix deltas (-8 KB), ui:check + ui:verify / /garden /library all 0 hard at 375/1024/1440 with screenshots inspected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-up: the Content Layer migration dropped the legacy loader's exclusion of _-prefixed files (Astro's draft convention) — a future _draft.json would have silently published; books have no status field so a hidden draft book would render. Patterns are now '**/[^_]*.json' per the documented migration idiom. Also switch the sitemap story sort to a codepoint compare so output cannot vary with build-host collation, and update the stale Tailwind wording in the gp-tokens.css header and packages/website/CLAUDE.md now that the stack is removed. Dist verified byte-identical; check 0 errors; test:content 19/19; ui:check 0 hard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 23 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Ground-truthed audit of the
packages/websiteAstro setup against current Astro 5.x best practice (live docs + installedastro@5.18.1source), followed by the four approved changes:sitewas unset and pages passed site-relativeseo.ogImagevalues straight intoog:image/twitter:image(invalid per the Open Graph spec; broken link previews). Canonicals now derive fromAstro.site(byte-identical output), og/twitter images are absolutized, the sitemap sorts stories deterministically and applies the chapternoindexfilter guilds/stories already had.type: 'data'→glob()loaders atsrc/content.config.ts,zfromastro/zod. Astro 6 removes the legacy path entirely. Proven behavior-neutral by a byte-identical dist. Keystatic (write-only, dev-only) unaffected.@astrojs/tailwind+tailwindcss/postcss/autoprefixer(utilities unused; only the injected preflight shipped, superseded bygp-tokens.css's reset). Hand-written-webkit-backdrop-filter/-webkit-mask-imagetwins; deletes deadBaseLayout.astro. CSS −8 KB.'**/[^_]*.json'preserves the legacy draft-file convention; codepoint sitemap sort; stale Tailwind comments updated.packages/website/package.json+bun.lockchange (removals only, viabun remove;bun install --frozen-lockfileverified). Dual-compiler contract untouched (roottypescript@6.0.3,@typescript/native7.0.2).Validation
bun run typecheck/plans:validate/build(41 pages) /test:content(19/19) /agentic:check— all passastro check: 0 errors / 6 hintsui:check+ui:verify / /garden /library: 0 hard violations @ 375/1024/1440, screenshots inspected/reviewreadiness passes: final verdict APPROVE🤖 Generated with Claude Code