Skip to content

Commit e8c5f32

Browse files
feat(docs): sitemap for all rule pages + dashboard CTA on every rule page
Two SEO/growth changes on docs.the-doctor.report. Sitemap: docs.the-doctor.report/sitemap.xml was 404, so Google had no efficient way to discover the 105 generated rule pages — the entire programmatic-SEO surface was invisible. Added @nuxtjs/sitemap + @nuxtjs/robots. The @nuxt/content v3 integration is NOT automatic: the collection must opt in via `sitemap: defineSitemapSchema()` from '@nuxtjs/sitemap/content', and @nuxtjs/sitemap must load BEFORE @nuxt/content (verified against the installed 8.2.2 package, not assumed). Sitemap now enumerates 111 URLs incl. all 105 rule pages (was 0), verified via a local worker. CTA: each generated rule page now ends with a callout linking to app.the-doctor.report (utm_source=docs&utm_medium=rule-page&utm_campaign= rule-cta) — 103 long-tail rule pages become 103 conversion funnels to the hosted dashboard. Wired into the codegen template so it stays in sync with the registry. Reverted 16 files of docs-local oxfmt-0.55 churn (the standalone oxfmt disagrees with the root vp fmt that CI actually gates on) — diff is scoped to the 4 functional files. Gate: oxlint 0, eslint 0, build 0, sitemap + CTA both live- verified. Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
1 parent 2439c80 commit e8c5f32

5 files changed

Lines changed: 247 additions & 15 deletions

File tree

apps/docs/content.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineCollection, defineContentConfig, z } from '@nuxt/content';
2+
import { defineSitemapSchema } from '@nuxtjs/sitemap/content';
23

34
export default defineContentConfig({
45
collections: {
@@ -7,6 +8,7 @@ export default defineContentConfig({
78
source: '**/*.md',
89
schema: z.object({
910
description: z.string().optional(),
11+
sitemap: defineSitemapSchema(),
1012
}),
1113
}),
1214
},

apps/docs/nuxt.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export default defineNuxtConfig({
2424
},
2525

2626
modules: [
27+
// Order is load-bearing: robots before sitemap (injects the sitemap URL
28+
// into robots.txt), and sitemap before @nuxt/content (v8 sitemap only
29+
// enumerates Content v3 collections registered before it).
30+
'@nuxtjs/robots',
31+
'@nuxtjs/sitemap',
2732
'@nuxt/content',
2833
'@nuxt/eslint',
2934
'@nuxt/icon',
@@ -103,6 +108,10 @@ export default defineNuxtConfig({
103108
},
104109
},
105110

111+
site: {
112+
url: process.env.NUXT_PUBLIC_BASE_URL || 'https://docs.the-doctor.report',
113+
},
114+
106115
content: {
107116
build: {
108117
markdown: {

apps/docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
"@nuxt/icon": "^2.2.5",
2828
"@nuxtjs/color-mode": "^4.0.1",
2929
"@nuxtjs/plausible": "^3.0.2",
30+
"@nuxtjs/robots": "^6.1.2",
31+
"@nuxtjs/sitemap": "^8.2.2",
3032
"@vueuse/core": "^14.3.0",
3133
"@vueuse/nuxt": "^14.3.0",
3234
"better-sqlite3": "^12.11.1",

apps/docs/scripts/generate-rule-pages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ for (const rule of RULE_REGISTRY) {
135135
'',
136136
`See the [category overview](${overviewHref}) for the full rule catalogue.`,
137137
'',
138+
'::callout{type="tip"}',
139+
`Want this rule enforced on every push? [the-doctor.report](https://app.the-doctor.report/?utm_source=docs&utm_medium=rule-page&utm_campaign=rule-cta) tracks your score over time, gates PRs on \`${rule.id}\`, and shows the trend across every branch — free while in early access.`,
140+
'::',
141+
'',
138142
].join('\n');
139143

140144
writeFileSync(rulePath, body, 'utf8');

0 commit comments

Comments
 (0)