Skip to content

feat(seo): internal linking + sitemap focus for Google indexing#214

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

feat(seo): internal linking + sitemap focus for Google indexing#214
ccf merged 3 commits intomainfrom
fix/seo-crawl-improvements

Conversation

@ccf
Copy link
Copy Markdown
Owner

@ccf ccf commented Apr 16, 2026

Summary

Google Search Console shows 17 pages "Discovered - currently not indexed." Internal linking is the main accelerator — the homepage previously had no deep links to individual doc pages.

Changes

  • Homepage chapter doc links: each chapter now links to a relevant docs page (Server, FinOps, Hooks) via inline links below bullet points
  • Footer: adds Hooks & Capture and FinOps links to the "The Book" column
  • Sitemap: excludes /blog/ pages to focus crawl budget on docs (blog content predates the harness pivot)
  • Hook System: description updated to mention PreCompact hooks

Sitemap

Before: 18 URLs (including 4 blog pages)
After: 14 URLs (homepage + 13 docs pages, focused)

Test plan

  • npm run build — 18 pages built
  • Sitemap contains 14 URLs, zero blog references
  • Homepage renders doc links in each chapter section

🤖 Generated with Claude Code


Note

Low Risk
Static site content/config changes only (sitemap filtering and internal links), with minimal risk beyond SEO/crawl behavior and navigation UX.

Overview
Improves SEO crawl focus and internal linking by excluding /blog URLs from the generated sitemap and adding prominent deep links to key docs pages from the homepage chapter sections.

Updates the footer’s “The Book” column to link to the new/important docs areas (Hooks & Capture, FinOps) and tweaks the Hook System doc frontmatter description to mention PreCompact alongside SessionEnd.

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

ccf and others added 2 commits April 16, 2026 07:39
Google Search Console shows 17 pages "Discovered - currently not
indexed." The main accelerator is internal linking — the homepage
previously linked only to /docs/ with no deep links to individual
doc pages.

- Homepage chapters now link to relevant docs (Server, FinOps, Hooks)
  via inline "Read: ..." links below bullet points
- Footer adds Hooks & Capture and FinOps links alongside existing
  Install and Architecture links
- Sitemap excludes /blog/ pages to focus crawl budget on docs (blog
  content predates the harness pivot and isn't maintained)
- Hook System description updated to mention PreCompact hooks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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: Build-time dateModified hurts SEO instead of helping
    • Replaced new Date().toISOString() with git log timestamps so dateModified reflects actual content modification dates rather than the build date.

Create PR

Or push these changes by commenting:

@cursor push 348bab3c26
Preview (348bab3c26)
diff --git a/website/src/layouts/DocsPage.astro b/website/src/layouts/DocsPage.astro
--- a/website/src/layouts/DocsPage.astro
+++ b/website/src/layouts/DocsPage.astro
@@ -7,6 +7,7 @@
 }
 
 import BaseLayout from "./BaseLayout.astro";
+import { execSync } from "node:child_process";
 
 const props = Astro.props;
 const title = props.title ?? props.frontmatter?.title ?? '';
@@ -36,6 +37,20 @@
 const pagePath = Astro.url.pathname.replace(/\/$/, "") || "/";
 const pageUrl = `${siteOrigin}${pagePath}/`;
 
+function getGitDateModified(pathname: string): string {
+  try {
+    const slug = pathname.replace(/^\//, "").replace(/\/$/, "");
+    const gitRoot = execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
+    const candidates = [`${gitRoot}/website/src/pages/${slug}.mdx`, `${gitRoot}/website/src/pages/${slug}.md`, `${gitRoot}/website/src/pages/${slug}.astro`];
+    for (const filePath of candidates) {
+      const ts = execSync(`git log -1 --format=%aI -- "${filePath}"`, { encoding: "utf-8" }).trim();
+      if (ts) return ts.split("T")[0];
+    }
+  } catch { /* ignore */ }
+  return new Date().toISOString().split("T")[0];
+}
+const dateModified = getGitDateModified(pagePath);
+
 // Two-level breadcrumb (Documentation → page). We don't include the
 // frontmatter `section` tier because the docs index uses different
 // section groupings than the frontmatter, so there's no real landing
@@ -48,7 +63,7 @@
     headline: title,
     description,
     inLanguage: "en",
-    dateModified: new Date().toISOString().split("T")[0],
+    dateModified,
     author: { "@type": "Organization", name: "Primer", url: siteOrigin },
     isPartOf: { "@type": "WebSite", name: "Primer Documentation", url: `${siteOrigin}/docs/` },
     mainEntityOfPage: { "@type": "WebPage", "@id": pageUrl },

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

Reviewed by Cursor Bugbot for commit 82f418e. Configure here.

Comment thread website/src/layouts/DocsPage.astro Outdated
Build-time dateModified claims every doc was modified on every deploy,
which Google penalizes as artificial freshness inflation. Remove it
until we can derive actual last-modified dates per file from git.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ccf ccf merged commit ef85a0a into main Apr 16, 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