feat(seo): internal linking + sitemap focus for Google indexing#214
Merged
feat(seo): internal linking + sitemap focus for Google indexing#214
Conversation
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
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.
- Replaced
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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
/blog/pages to focus crawl budget on docs (blog content predates the harness pivot)Sitemap
Before: 18 URLs (including 4 blog pages)
After: 14 URLs (homepage + 13 docs pages, focused)
Test plan
npm run build— 18 pages built🤖 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
/blogURLs 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 theHook Systemdoc frontmatter description to mentionPreCompactalongsideSessionEnd.Reviewed by Cursor Bugbot for commit a60d0a0. Bugbot is set up for automated code reviews on this repo. Configure here.