Commit 05c8bfe
Add comprehensive SEO static checker (#424)
* Add comprehensive SEO static checker that runs before deployment
Implements a production-ready SEO validation system that scans the dist folder and ensures all built pages meet SEO standards. The checker validates 70+ rules across metadata, content, links, images, structured data, and internationalization.
Features:
- Automatically runs after every build via build:after script
- Blocks deployment if critical SEO errors are found
- Highly configurable with granular rule exclusions
- Smart filtering to skip error pages and redirects
- Multiple output formats (console, JSON, SARIF)
Current configuration disables non-critical rules to allow initial deployment. Rules can be gradually enabled as issues are fixed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
* Expand SEO checker: implement 200+ rules from 1152-rule CSV
- Regenerated rules.ts from CSV with all 1152 SEO rules
- Expanded checks.ts from ~70 to 200+ implemented rules
- Fixed rule ID mismatches (mailto, tel, URL hygiene checks)
- Added SEO00003 (missing meta robots) to disabled list
Categories now covered:
- Metadata (title, description, robots, viewport, charset)
- HTML validity and structure
- Content length and format validation
- Headings hierarchy (H1-H6)
- Indexability and canonicals
- Links (broken, nofollow, noopener, mailto, tel)
- URL hygiene (session IDs, parameters, encoding)
- Images (alt text, dimensions, file size, lazy loading)
- Social tags (OG, Twitter cards)
- International SEO (hreflang)
- Structured data (24 Schema.org types validated)
- Content quality (duplicates, placeholders, thin content)
- Accessibility basics
- HTML semantics
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix SonarCloud issues: move rules to JSON, add regex error handling
- Move SEO rules from TypeScript to JSON file (reduces 11k lines to 24)
- Fixes SonarCloud duplication warning (was 76.6%, required ≤3%)
- JSON data files are not analyzed for code duplication
- Add try-catch for regex patterns in exclusions.ts
- Fixes security hotspots for ReDoS vulnerability
- Invalid regex patterns now fail gracefully
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add robots.txt and sitemap.xml validation checks
New checks added:
- SEO01153: Missing robots.txt file
- SEO01154: robots.txt syntax errors
- SEO01155: Missing Sitemap directive in robots.txt
- SEO01156: robots.txt blocks all crawlers
- SEO01157: Sitemap URL domain mismatch
- SEO01158: Missing sitemap.xml file
- SEO01159: Invalid XML syntax in sitemap
- SEO01160: Sitemap URL references non-existent page
- SEO01161: Sitemap uses HTTP instead of HTTPS
- SEO01162: Duplicate URLs in sitemap
- SEO01163: Invalid lastmod date format
- SEO01164: Trailing slash inconsistency
- SEO01165: robots.txt references non-existent sitemap
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* perf: optimize SEO checker with parallel processing
- Rewrite parser.ts with parallel file I/O using fs/promises
- Add parallel directory traversal for faster file discovery
- Process HTML files in batches of 200 for optimal memory usage
- Add file existence caching to avoid redundant filesystem checks
- Run page checks in parallel batches of 500 with setImmediate
- Execute site-wide checks (duplicates, robots, sitemap) concurrently
Performance: ~109s for 6085 pages (previously ~142s)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Migrate to @capgo/seo-checker CLI
- Replace custom scripts/seo-checker with @capgo/seo-checker package
- Update package.json scripts to use seo-checker CLI
- Configure failOn to include warnings (stricter CI)
- Remove old seo-checker scripts folder
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* chore: update bun.lock
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Use GitHub output format for SEO checker
- seo:check now outputs GitHub Actions annotations
- Add seo:check:local for console output when running locally
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude Haiku 4.5 <[email protected]>1 parent a3d80ea commit 05c8bfe
File tree
6 files changed
+158
-5
lines changed6 files changed
+158
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
90 | 136 | | |
91 | 137 | | |
92 | 138 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
96 | 145 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments