Skip to content

Add Sphinx docs site with example previews; fix dropped PDF background - #1

Merged
connorferster merged 2 commits into
mainfrom
docs-site-and-background-fix
Jul 4, 2026
Merged

Add Sphinx docs site with example previews; fix dropped PDF background#1
connorferster merged 2 commits into
mainfrom
docs-site-and-background-fix

Conversation

@connorferster

Copy link
Copy Markdown
Contributor

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

  • 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) that pulls each example's YAML via literalinclude and shows the actual rendered-PDF previews (generated with ym convert → PyMuPDF), so docs stay in sync with Examples/.
  • Click-to-enlarge lightbox for previews — accessible, dependency-free (× / backdrop / Esc to close).
  • Refreshed the top-level README with 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. Now stores combined_doctemplate directly so ['yaml']['_doc'] is the real doc config again.
  • Regenerated all example PDFs with the fix (the PDF-backgrounds example renders its template + populated form fields again).

Build

Zero-warning build:

uv run --with-requirements docs/requirements.txt \
    sphinx-build -b html docs docs/_build/html

Commits

  • Add Sphinx docs site + example previews; fix dropped PDF background
  • Add click-to-enlarge lightbox to Examples previews

🤖 Generated with Claude Code

connorferster and others added 2 commits July 3, 2026 23:52
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>
@connorferster
connorferster merged commit 3dfd5f8 into main Jul 4, 2026
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.

1 participant