Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ pnpm-debug.log*
.DS_Store
astro_tmp_pages_*
capgo_24-dec-2025_all-issues_2025-12-31_03-10-38
.DS_Store

# SEO checker reports
seo-report.txt
seo-report.json
seo-report.sarif
55 changes: 52 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,59 @@ When creating or modifying pages, always consider SEO:
- SEO helpers: `src/lib/ldJson.ts`
- Styles: Tailwind CSS

## SEO Static Checker

The project includes a comprehensive SEO static checker that runs after each build. It validates:

- Metadata (title, description, canonical, charset, lang)
- HTML validity (duplicate tags, doctype, duplicate IDs)
- Content length (title, description, H1 length limits)
- Headings (H1 presence, heading hierarchy)
- Links (broken links, empty hrefs, generic anchor text)
- Images (alt attributes, broken images, file size)
- Social tags (OpenGraph, Twitter cards)
- International SEO (hreflang validation)
- Structured data (JSON-LD validation)
- Duplicates (across pages)

### Configuration

- `seo-checker.config.json` - Main configuration file
- `seo-checker.exclusions.json` - Specific issue exclusions

### Excluding Issues

To exclude a specific issue, add it to `seo-checker.exclusions.json`:

```json
{
"exclusions": [
{
"fingerprint": "SEO00147::blog/old-post/index.html::/broken-link",
"reason": "Legacy link, intentionally kept for redirects"
},
{
"ruleId": "SEO00153",
"filePath": "icons/**/*.html",
"reason": "Icon pages use decorative images"
}
]
}
```

Exclusion types (from most to least specific):
1. `fingerprint` - Exact issue match (rule + file + element)
2. `ruleId` + `filePath` - Rule for specific file pattern
3. `ruleId` + `elementPattern` - Rule for specific element content
4. `ruleId` - Disable entire rule (use config.rules.disabled instead)

## Common Commands

```bash
bun run dev # Start development server
bun run build # Build for production
bun run preview # Preview production build
bun run dev # Start development server
bun run build # Build for production
bun run preview # Preview production build
bun run seo:check # Run SEO checker manually
bun run seo:check:json # Output as JSON
bun run seo:check:report # Save report to file
```
3 changes: 3 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
"generate:plugins-readme": "bun run scripts/generate-plugins-readme.ts",
"build": "export NODE_OPTIONS='--max-old-space-size=8192' UV_THREADPOOL_SIZE=16; astro build",
"build:prepare": "bun run fetch:stars && bun run fetch:downloads && bun run generate:plugins-readme && bun run fix_code_languages_all",
"build:after": "bun run repair_sitemap",
"build:after": "bun run repair_sitemap && bun run seo:check",
"seo:check": "seo-checker --output github",
"seo:check:json": "seo-checker --output json",
"seo:check:report": "seo-checker --report seo-report.txt",
"seo:check:local": "seo-checker",
"seo:generate-config": "seo-checker --generate-config",
"preview": "wrangler dev",
"types": "npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/services/supabase.types.ts",
"fmt": "prettier --write '**/*' --ignore-unknown",
Expand Down Expand Up @@ -71,6 +76,7 @@
"@types/semver": "^7.7.1",
"@types/toastify-js": "^1.12.4",
"astro-font": "^1.1.0",
"@capgo/seo-checker": "^0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if @capgo/seo-checker exists on npm and get version info
npm view @capgo/seo-checker versions --json 2>/dev/null | tail -20
echo "---"
npm view @capgo/seo-checker version 2>/dev/null
echo "---"
npm view @capgo/seo-checker dist-tags 2>/dev/null
echo "---"
npm view @capgo/seo-checker 2>/dev/null | head -30

Repository: Cap-go/website

Length of output: 782


@capgo/seo-checker@0.0.1 is the brand-new, first-ever release of this package—consider the risk of using it in a deployment-blocking context.

This package was published only hours ago and has no release history. Using a completely untested, newly-published package in your build:after hook creates significant risk: any latent bugs discovered later could block all deployments. Consider either thoroughly testing this version in non-blocking scenarios first, deferring its use until the package has multiple releases and proven stability, or restructuring your build process so SEO checker failures don't block deployments.

"cheerio": "1.1.2",
"dayjs": "^1.11.19",
"faiss-node": "^0.5.1",
Expand Down
86 changes: 86 additions & 0 deletions seo-checker.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"distPath": "./dist",
"baseUrl": "https://capgo.app",
"languages": [
"en",
"fr",
"de",
"es",
"it",
"pt",
"ja",
"ko",
"zh",
"ru",
"nl",
"pl",
"uk",
"id",
"ar"
],
"defaultLanguage": "en",
"rules": {
"disabled": [
"SEO00003",
"SEO00186",
"SEO00189",
"SEO00160",
"SEO00222",
"SEO00116",
"SEO00117",
"SEO00118",
"SEO00119",
"SEO00120",
"SEO00121",
"SEO00122",
"SEO00123",
"SEO00124",
"SEO00135",
"SEO00136",
"SEO00137",
"SEO00152",
"SEO00111",
"SEO00088",
"SEO00090",
"SEO00092",
"SEO00094",
"SEO00168",
"SEO00169",
"SEO00170",
"SEO00171",
"SEO00172",
"SEO00371",
"SEO00372",
"SEO00177",
"SEO00178",
"SEO00179",
"SEO00180",
"SEO00229",
"SEO00230",
"SEO00231",
"SEO00020",
"SEO00027",
"SEO00034",
"SEO00147",
"SEO00155",
"SEO00134",
"SEO00144",
"SEO00380",
"SEO00143",
"SEO00164",
"SEO00166",
"SEO00023",
"SEO00030",
"SEO00110",
"SEO00125",
"SEO00013",
"SEO00007"
],
"severityOverrides": {},
"thresholdOverrides": {}
},
"exclusions": [],
"failOn": ["error", "warning"],
"maxIssues": 0,
"outputFormat": "console"
}
5 changes: 5 additions & 0 deletions seo-checker.exclusions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./seo-checker.exclusions.schema.json",
"description": "SEO Checker Exclusions - Add specific issues to exclude from the SEO check",
"exclusions": []
}