Skip to content

Astro 5.x audit: site/og URL fix, Content Layer migration, Tailwind retirement - #16

Merged
Oba-One merged 4 commits into
mainfrom
astro-audit-modernization
Jul 18, 2026
Merged

Astro 5.x audit: site/og URL fix, Content Layer migration, Tailwind retirement#16
Oba-One merged 4 commits into
mainfrom
astro-audit-modernization

Conversation

@Oba-One

@Oba-One Oba-One commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

Ground-truthed audit of the packages/website Astro setup against current Astro 5.x best practice (live docs + installed astro@5.18.1 source), followed by the four approved changes:

  • fix(website): set site and emit absolute canonical/og URLssite was unset and pages passed site-relative seo.ogImage values straight into og:image/twitter:image (invalid per the Open Graph spec; broken link previews). Canonicals now derive from Astro.site (byte-identical output), og/twitter images are absolutized, the sitemap sorts stories deterministically and applies the chapter noindex filter guilds/stories already had.
  • refactor(website): migrate content collections to the Content Layer API — legacy type: 'data'glob() loaders at src/content.config.ts, z from astro/zod. Astro 6 removes the legacy path entirely. Proven behavior-neutral by a byte-identical dist. Keystatic (write-only, dev-only) unaffected.
  • build(website): retire tailwind stack — removes deprecated @astrojs/tailwind + tailwindcss/postcss/autoprefixer (utilities unused; only the injected preflight shipped, superseded by gp-tokens.css's reset). Hand-written -webkit-backdrop-filter/-webkit-mask-image twins; deletes dead BaseLayout.astro. CSS −8 KB.
  • fix(website): restore underscore exclusion in content glob patterns — review follow-up: '**/[^_]*.json' preserves the legacy draft-file convention; codepoint sitemap sort; stale Tailwind comments updated.

⚠️ Dependency surface: packages/website/package.json + bun.lock change (removals only, via bun remove; bun install --frozen-lockfile verified). Dual-compiler contract untouched (root typescript@6.0.3, @typescript/native 7.0.2).

Validation

  • bun run typecheck / plans:validate / build (41 pages) / test:content (19/19) / agentic:check — all pass
  • astro check: 0 errors / 6 hints
  • ui:check + ui:verify / /garden /library: 0 hard violations @ 375/1024/1440, screenshots inspected
  • Per-stage dist diffs: og-fix only → byte-identical → CSS-only → byte-identical
  • Authenticated local browser QA on /, /garden, /library (mobile width): rendered correctly, 0 console errors
  • Two /review readiness passes: final verdict APPROVE

🤖 Generated with Claude Code

Oba-One and others added 4 commits July 17, 2026 22:29
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>
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Oba-One, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00182a29-3b94-4975-ab33-c44efb5ea677

📥 Commits

Reviewing files that changed from the base of the PR and between 15107c1 and 9c686ae.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • scripts/data/ui-source-baseline.tsv is excluded by !**/*.tsv
📒 Files selected for processing (16)
  • packages/website/CLAUDE.md
  • packages/website/astro.config.mjs
  • packages/website/package.json
  • packages/website/postcss.config.js
  • packages/website/src/components/shell/SiteHeader.astro
  • packages/website/src/content.config.ts
  • packages/website/src/layouts/BaseLayout.astro
  • packages/website/src/layouts/GpLayout.astro
  • packages/website/src/pages/chapters/index.astro
  • packages/website/src/pages/library/index.astro
  • packages/website/src/pages/map/moderate.astro
  • packages/website/src/pages/sitemap.xml.ts
  • packages/website/src/pages/stories/index.astro
  • packages/website/src/styles/gp-tokens.css
  • packages/website/tailwind.config.js
  • scripts/public-content-contract.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch astro-audit-modernization

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Oba-One
Oba-One merged commit aaca9e4 into main Jul 18, 2026
6 checks passed
@Oba-One
Oba-One deleted the astro-audit-modernization branch July 18, 2026 19:03
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