fix(docs): correct YAML frontmatter syntax in s2-docs#699
Merged
Conversation
Fixed GitHub rendering errors caused by invalid YAML frontmatter syntax in 99 s2-docs markdown files. Changes: - Fixed asterisk (*) list items to use dash (-) syntax - Removed escaped underscores (\_) from field names - Removed angle brackets from URLs - Cleaned up excessive blank lines in frontmatter Added tooling to prevent future issues: - Created fix-yaml-frontmatter.js script to automate fixes - Added YAML frontmatter validation tests with AVA - Updated lint-staged to exclude s2-docs from remark processing - Updated s2-docs-transformer README with new tools This resolves the "Error in user YAML" issue visible on GitHub when viewing s2-docs markdown files. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Member
Author
Run report for 70298922Total time: 7.5ms | Comparison time: 0s | Estimated loss: 7.5ms (100.0% slower)
Touched files |
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.
Summary
Fixed GitHub rendering errors caused by invalid YAML frontmatter syntax in 99 s2-docs markdown files. This resolves the "Error in user YAML" issue that was preventing files from rendering correctly on GitHub.
Problem
The s2-docs markdown files had multiple YAML syntax errors in their frontmatter:
*) instead of dashes (-) - YAML interprets*as alias references\_) in field names likesource\_urlandlast\_updated<https://...>Example error from GitHub:
Changes
Fixed Files (99 files)
docs/s2-docs/**/*.mdfiles now have valid YAML frontmatterNew Tooling
Added to
tools/s2-docs-transformer/:scripts/fix-yaml-frontmatter.js- Automatically fixes YAML syntax issuestest/yaml-frontmatter.test.js- Validates YAML frontmatter across all s2-docsava.config.js- Test configurationConfiguration Updates
.lintstagedrc.js- Excludeddocs/s2-docs/from remark processing to prevent future breakagetools/s2-docs-transformer/package.json- Addedfix-yamlandtestscriptstools/s2-docs-transformer/moon.yml- Addedfix-yamlandtesttaskstools/s2-docs-transformer/README.md- Documented new functionalityTest Plan
pnpm --filter @adobe/s2-docs-transformer run test)Screenshots
Before: GitHub shows "Error in user YAML" when viewing files
After: Files render correctly with proper frontmatter display
Future Prevention
The new test suite will catch these issues in CI before they reach main:
pnpm --filter @adobe/s2-docs-transformer run testTo fix issues manually:
Made with Cursor