feat: YAML frontmatter support, blank page fix, code alignment, and uv runner#8
Open
Hunter-Leo wants to merge 2 commits intolovstudio:mainfrom
Open
feat: YAML frontmatter support, blank page fix, code alignment, and uv runner#8Hunter-Leo wants to merge 2 commits intolovstudio:mainfrom
Hunter-Leo wants to merge 2 commits intolovstudio:mainfrom
Conversation
- Parse YAML frontmatter (--- ... ---) from markdown top: title, subtitle, author, date, version, theme, watermark, footer-left, copyright, and all other CLI params. CLI args take precedence over frontmatter values. - Strip H1 visual elements (Spacer, Paragraph, decorations) when a cover title is provided, keeping ChapterMark for TOC anchor links. Prevents duplicate title page and blank page after TOC. - Replace dynamic _cur_chapter[0] in top-band and full header with fixed doc title to avoid reportlab onPage timing offset (chapter name always lagged one page behind actual content). - Fix code block mid-line space collapsing: replace all spaces with in esc_code() to preserve ASCII diagrams and padded column alignment. - Reduce H2 chapter spacer from 30% page height to 8mm for manual/report style documents (avoids large whitespace at top of each chapter page).
- Rewrite Pre-Conversion section into 3-step workflow: inspect MD, ask options, write frontmatter directly into the file - Promote YAML frontmatter as the primary config method over CLI args - Add uv-first invocation in Quick Start and Dependencies sections - Add Frontmatter Support section with full key reference table - Bump version to 1.1.0; replace example title placeholder Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.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.
Summary
--- ... ---block, making documents self-contained and reproducible with a minimal command (--inputonly). CLI args always take precedence.# H1heading, all visual elements generated by that heading are stripped to prevent a duplicate/blank title page. TheChapterMarkis kept so TOC anchors remain valid._cur_chapter[0], which caused a one-page lag due to reportlab'sonPagecallback timing.esc_code()now replaces all spaces (not just leading) with , preserving mid-line alignment in ASCII diagrams and padded columns.body_h * 0.30(~74mm) to a fixed8mmfor technical reports.uv run --with reportlabas the preferred zero-install invocation.Test plan
# H1+ cover — verify no blank page between TOC and first##chapteruv run --with reportlab— verify no pip install required