Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store
astro_tmp_pages_*
capgo_24-dec-2025_all-issues_2025-12-31_03-10-38
capgo_24-dec-2025_all-issues_2025-12-31_03-10-38

# 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
```
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"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": "bun run scripts/seo-checker/index.ts",
"seo:check:json": "bun run scripts/seo-checker/index.ts --output json",
"seo:check:report": "bun run scripts/seo-checker/index.ts --report seo-report.txt",
"seo:generate-config": "bun run scripts/seo-checker/index.ts --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
Loading