Add Sphinx docs site with example previews; fix dropped PDF background - #1
Merged
Conversation
Documentation:
- New Sphinx site under docs/ using the Shibuya theme (light) with MyST
markdown: landing page, installation, quickstart, guides (document
structure, configuration, variables, PDF backgrounds), and reference
(blocks, CLI, fonts).
- Examples gallery (docs/examples.md) pulling each example's YAML via
literalinclude alongside rendered-PDF previews (docs/_static/examples/).
- Refresh top-level README with the YMPrint branding, logo, and summary.
Fix:
- context_builder stored the doctemplate config double-wrapped as
{"_doc": {"_doc": {...}}}, so load_pdf_backgrounds and the first-page
check read the wrapper and silently dropped `background`/`first-page`.
Store combined_doctemplate directly so ['yaml']['_doc'] is the real
doc config again. Regenerated all example PDFs with the fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Clicking a rendered-PDF preview now opens it enlarged in an accessible, dependency-free overlay (close via ×, backdrop, or Esc). The one-page PDF-backgrounds preview moves to a centered container so Sphinx no longer wraps it in an auto-link, keeping click behavior uniform across all previews. Co-Authored-By: Claude Opus 4.8 <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
Adds a full documentation site and a runnable Examples gallery with rendered-PDF previews, and fixes a regression that silently dropped PDF backgrounds.
Documentation
docs/using the Shibuya theme (light) with MyST markdown: landing page, installation, quickstart, guides (document structure, configuration, variables, PDF backgrounds), and reference (blocks, CLI, fonts).docs/examples.md) that pulls each example's YAML vialiteralincludeand shows the actual rendered-PDF previews (generated withym convert→ PyMuPDF), so docs stay in sync withExamples/.Fix
context_builderstored the doctemplate config double-wrapped as{"_doc": {"_doc": {...}}}, soload_pdf_backgroundsand the first-page check read the wrapper and silently droppedbackground/first-page. Now storescombined_doctemplatedirectly so['yaml']['_doc']is the real doc config again.Build
Zero-warning build:
uv run --with-requirements docs/requirements.txt \ sphinx-build -b html docs docs/_build/htmlCommits
🤖 Generated with Claude Code