Files
ASWIN C G f6e8c76951 feat(docs): add offline mermaid support to PDF export (#2530)
## 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`
2025-12-22 11:19:54 +05:30
..
2025-11-26 08:27:23 -08:00