Skip to content

feat: add frontmatter validation for new docs#2523

Merged
Automaat merged 2 commits intomasterfrom
feat/frontmatter-validation
Nov 25, 2025
Merged

feat: add frontmatter validation for new docs#2523
Automaat merged 2 commits intomasterfrom
feat/frontmatter-validation

Conversation

@Automaat
Copy link
Contributor

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 in app/_src/
  • Checks: title, description presence; keywords 1-3 items
  • tools/test-validate-frontmatter.sh - 10 test cases for validator
  • CI job in ci.yml runs on PRs
  • Separate workflow test-tools.yml tests tool scripts on changes to tools/
  • mise frontmatter:validate for local use
  • mise test:tools runs all tool tests

Supporting documentation

Part of Phase 2.2 SEO metadata rollout.

Copilot AI review requested due to automatic review settings November 25, 2025 14:42
@Automaat Automaat requested a review from a team as a code owner November 25, 2025 14:42
@Automaat Automaat requested review from johncowen and schogges and removed request for a team November 25, 2025 14:42
@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for kuma ready!

Name Link
🔨 Latest commit cc0ac86
🔍 Latest deploy log https://app.netlify.com/projects/kuma/deploys/6925e45d1e576b000850d661
😎 Deploy Preview https://deploy-preview-2523--kuma.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🟢 up 30 from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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>
@Automaat Automaat enabled auto-merge (squash) November 25, 2025 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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>
@Automaat Automaat merged commit 6e5a8ba into master Nov 25, 2025
20 checks passed
@Automaat Automaat deleted the feat/frontmatter-validation branch November 25, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants