Skip to content

Support YAML Front Matter for titles and description#35

Merged
AlexJSully merged 5 commits intomainfrom
26-feature-add-support-for-yaml-front-matter-in-markdown-files
Feb 16, 2026
Merged

Support YAML Front Matter for titles and description#35
AlexJSully merged 5 commits intomainfrom
26-feature-add-support-for-yaml-front-matter-in-markdown-files

Conversation

@AlexJSully
Copy link
Owner

No description provided.

@AlexJSully AlexJSully requested a review from Copilot February 15, 2026 03:34
@AlexJSully AlexJSully self-assigned this Feb 15, 2026
@AlexJSully AlexJSully linked an issue Feb 15, 2026 that may be closed by this pull request
2 tasks
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 pull request adds YAML front matter support to the Workspace Wiki extension, enabling markdown files to specify custom titles and descriptions that override filename-based defaults. The implementation uses the gray-matter library to parse YAML front matter from markdown files and integrates this functionality throughout the tree building and display pipeline.

Changes:

  • Added front matter extraction utilities that parse YAML from markdown files to extract title and description fields
  • Modified tree building to use front matter titles when available, falling back to normalized filenames
  • Updated tree tooltips to display front matter descriptions instead of file paths when available
  • Added comprehensive unit tests for front matter parsing with data-driven testing patterns
  • Updated configuration files (tsconfig, markdownlint) to support the new functionality and prevent linting conflicts

Reviewed changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/utils/textUtils.ts Added extractFrontMatter() and extractFrontMatterTitle() functions using gray-matter library; removed unused toSnakeCase() and toCamelCase() functions
src/utils/textUtils.test.ts Added comprehensive unit tests for front matter extraction with table-driven testing patterns; refactored existing tests to use test.each()
src/tree/buildTree.ts Integrated front matter extraction into tree building, using front matter titles when available and attaching descriptions to nodes
src/tree/buildTree.test.ts Updated all buildTree tests to handle async function signature
src/tree/treeProvider.ts Modified tooltip assignment to use front matter description when available, falling back to file path
src/tree/treeProvider.test.ts Updated mock implementations and tests to handle async buildTree function
src/types/treeNode.ts Added optional description field to TreeNode interface for front matter descriptions
src/types/workspaceLike.ts Modified findFiles return type to accommodate test mocks (union with plain objects)
tsconfig.json Added "jest" to types array and removed **/*.test.ts from exclude list to enable test type checking
package.json Added gray-matter dependency (^4.0.3)
package-lock.json Lockfile updates for gray-matter and its dependencies (js-yaml, kind-of, section-matter, etc.)
.markdownlint.json Added MD025 configuration with front_matter_title regex to recognize YAML front matter blocks
example/file-types-test/test-md.md Added example front matter with title and description to demonstrate the feature
docs/architecture/utilities.md Added documentation for YAML front matter support including examples and implementation details
docs/architecture/scanner.md Updated description to clarify scanner doesn't cache metadata or watch for changes
docs/usage/testing.md Added section explaining Jest types are available via tsconfig.json types entry
docs/project/index.md Removed reference to non-existent ROADMAP.md file
README.md Added bullet point highlighting YAML front matter support feature
.github/copilot-instructions.md Added problem-solving philosophy section and test table format documentation
src/utils/fileUtils.test.ts Removed unnecessary jest import (globals available via tsconfig)
src/utils/configUtils.test.ts Removed unnecessary jest import (globals available via tsconfig)
src/controllers/previewController.test.ts Removed unnecessary jest import (globals available via tsconfig)

@AlexJSully AlexJSully merged commit 1365971 into main Feb 16, 2026
2 checks passed
@AlexJSully AlexJSully deleted the 26-feature-add-support-for-yaml-front-matter-in-markdown-files branch February 16, 2026 15:44
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.

Feature: Add Support for YAML Front Matter in Markdown Files

2 participants