mirror of
https://github.com/vibrantlabsai/ragas.git
synced 2026-10-12 02:24:10 +00:00
## Issue Link / Problem Description - Fixes https://github.com/vibrantlabsai/ragas/issues/2529 ## Changes Made - Added the `mkdocs-mermaid-to-svg` plugin to the `docs-pdf` dependency group in `pyproject.toml`. - Configured `mkdocs-pdf.yml` to use `mermaid-to-svg` (gated by `ENABLE_PDF_EXPORT`), converting Mermaid diagrams to SVG images before PDF generation. - Added a new `check-mermaid-deps` Makefile target to verify Node.js and Mermaid CLI (`mmdc`) are available before PDF build. - Updated the PDF export documentation to mention offline Mermaid rendering requirements. ## Testing ### How to Test - [ ] Automated tests added/updated - [ ] Manual testing steps: 1. Run `make build-docs-pdf` in your local environment. 2. Open `site/pdf/document.pdf` and verify that Mermaid diagrams are rendered as SVGs (not as raw code blocks). 3. Confirm that HTML builds (via `make build-docs` or `make serve-docs`) are unaffected. ## References - Documentation: `docs/community/pdf_export.md`