Skip to content

feat(seo): internal linking, sitemap focus, CSS inlining fix#215

Merged
ccf merged 3 commits intomainfrom
fix/seo-crawl-improvements
Apr 17, 2026
Merged

feat(seo): internal linking, sitemap focus, CSS inlining fix#215
ccf merged 3 commits intomainfrom
fix/seo-crawl-improvements

Conversation

@ccf
Copy link
Copy Markdown
Owner

@ccf ccf commented Apr 16, 2026

Summary

Addresses multiple SEO and rendering issues to help Google index the site's docs pages.

Rendering Fix (critical)

Docs pages (notably /docs/server/) were rendering as raw unstyled HTML. The @playform/inline critters plugin's default "media" preload strategy was deferring all CSS without inlining any critical styles. Fixed by configuring preload: "swap" which still inlines critical CSS but swaps stylesheets asynchronously after load.

Internal Linking

Google Search Console showed 17 pages "Discovered - currently not indexed." Internal linking is the main accelerator:

  • Homepage chapters now deep-link to relevant docs (Server, FinOps, Hooks)
  • Footer adds Hooks & Capture and FinOps to the "The Book" column
  • Hook System description updated to mention PreCompact hooks

Sitemap Focus

  • Excluded /blog/ pages to focus crawl budget on docs (blog content predates the harness pivot)
  • 14 URLs (vs 18 before)

Structured Data

  • Added + then removed artificial dateModified from TechArticle JSON-LD (Google penalizes build-time stamps as fake freshness signals)
  • Added author: Organization to TechArticle

Test plan

  • npm run build — 18 pages built with inlined critical CSS
  • /docs/server/ renders correctly on local preview
  • After deploy: resubmit sitemap in Google Search Console

🤖 Generated with Claude Code


Note

Medium Risk
Changes the site build’s critical-CSS inlining and stylesheet preload behavior, which can affect docs rendering and performance across all pages if misconfigured.

Overview
Updates website/astro.config.mjs to pass an explicit Beasties.preload: "swap" configuration into @playform/inline instead of using the plugin defaults.

This ensures critical CSS is still inlined while deferred stylesheets swap to rel="stylesheet" after load, addressing pages that previously rendered unstyled due to the default preload strategy (and clarifying the correct config key via comments).

Reviewed by Cursor Bugbot for commit 109b858. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Wrong configuration key silently disables CSS fix
    • Changed the configuration key from Critters to Beasties in website/astro.config.mjs to match what @playform/inline v0.1.4 (which depends on beasties, not critters) actually reads, so the preload: "swap" option now takes effect.

Create PR

Or push these changes by commenting:

@cursor push 6fafa9612a
Preview (6fafa9612a)
diff --git a/website/astro.config.mjs b/website/astro.config.mjs
--- a/website/astro.config.mjs
+++ b/website/astro.config.mjs
@@ -18,7 +18,7 @@
       filter: (page) => !page.includes("/blog"),
     }),
     inline({
-      Critters: {
+      Beasties: {
         // "swap" converts deferred links to preloads that swap to
         // rel="stylesheet" once loaded — preserving inline critical CSS
         // so pages don't render unstyled while waiting for the full

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 786a3cf. Configure here.

Comment thread website/astro.config.mjs
ccf and others added 3 commits April 16, 2026 23:11
The CSS inlining plugin deferred ALL stylesheets on some docs pages
(notably /docs/server/) without inlining any critical CSS, causing
the page to render as raw unstyled HTML with giant SVG chevrons.
The ~800ms render-blocking CSS savings aren't worth broken first
paint on any page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The default "media" preload strategy deferred all CSS on some pages
without inlining anything, causing unstyled renders. The "swap"
strategy converts deferred links to preloads that swap to
rel="stylesheet" once loaded, while still inlining critical CSS
so pages render styled on first paint.

Verified: all 18 pages now have inlined critical CSS + async full
stylesheet loading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The earlier fix passed the preload option under a "Critters" key, but
@playform/inline v0.1.4 expects "Beasties" (the package wraps the
beasties library, not critters). Unrecognized keys are silently
ignored, so the preload:"swap" setting never took effect — docs
pages kept rendering unstyled because the default "media" strategy
remained active.

Verified on build: docs/server/index.html now has critical CSS inlined
in a <style> block and the Tailwind stylesheet loads via rel="preload"
with onload="this.rel='stylesheet'" (the swap strategy).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ccf ccf force-pushed the fix/seo-crawl-improvements branch from 786a3cf to 109b858 Compare April 17, 2026 03:17
@ccf ccf merged commit 9a39d0b into main Apr 17, 2026
6 checks passed
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