feat: add frontmatter validation for new docs#2523
Merged
Conversation
✅ Deploy Preview for kuma ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Validates title, description, keywords (1-3 items) in new docs files. Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
8c11978 to
176b69d
Compare
bartsmykla
approved these changes
Nov 25, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds frontmatter validation for new documentation files to enforce SEO metadata consistency. It introduces a bash-based validation script that checks for required frontmatter fields (title, description, and 1-3 keywords) on newly added markdown files in the app/_src/ directory, along with comprehensive test coverage and CI integration.
Key changes:
- New validation script with keyword count enforcement (1-3 items)
- Self-contained test suite with 10 test cases covering various scenarios
- CI integration via GitHub Actions for automated validation on PRs
- Local development support via mise tasks
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/validate-frontmatter.sh | Bash script that validates frontmatter in new docs files, checking for title, description, and keywords fields with appropriate constraints |
| tools/test-validate-frontmatter.sh | Test suite with 10 test cases that validates the frontmatter checking logic using fixture files |
| mise.toml | Adds frontmatter:validate and test:tools tasks; updates check task to include frontmatter validation (removes links:check dependency) |
| .github/workflows/test-tools.yml | New workflow that runs tool tests when changes are made to the tools/ directory |
| .github/workflows/ci.yml | Adds frontmatter validation job that runs on pull requests with proper git fetch configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Verify description has non-empty value - Fix regex to detect any YAML field ending keywords section - Rename FILES_FOUND to HAS_FILES for clarity - Add test for keywords followed by another field Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.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.

Motivation
Enforce required frontmatter fields (title, description, keywords) on new docs pages to ensure SEO metadata consistency.
Implementation information
tools/validate-frontmatter.sh- validates new docs files inapp/_src/tools/test-validate-frontmatter.sh- 10 test cases for validatorci.ymlruns on PRstest-tools.ymltests tool scripts on changes totools/mise frontmatter:validatefor local usemise test:toolsruns all tool testsSupporting documentation
Part of Phase 2.2 SEO metadata rollout.