Skip to content

fix: avoid embedding of YAML frontmatter#239

Merged
rich-iannone merged 3 commits into
mainfrom
fix-embedding-of-yaml-frontmatter
Jun 28, 2026
Merged

fix: avoid embedding of YAML frontmatter#239
rich-iannone merged 3 commits into
mainfrom
fix-embedding-of-yaml-frontmatter

Conversation

@rich-iannone

Copy link
Copy Markdown
Member

This PR fixes an issue where _create_index_from_readme() embedded the source index.qmd's YAML frontmatter verbatim into the generated homepage and ran its heading-bump regex over fenced code blocks. The changes here strip the source file's leading frontmatter before embedding via the existing _split_frontmatter() helper. Adds a dedicated GDG regression package (gdtest_index_frontmatter) plus two tests that fail on the old code and pass on the fix, covering both the frontmatter-stripping and cell-option-preservation behavior end-to-end.

Fixes: #237

@rich-iannone rich-iannone merged commit 7d99fe9 into main Jun 28, 2026
8 checks passed
@rich-iannone rich-iannone deleted the fix-embedding-of-yaml-frontmatter branch June 28, 2026 20:33
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.

_create_index_from_readme embeds frontmatter verbatim and heading bump breaks cell options

1 participant