← Материалы разборы Yersham
разбор · статьятема-фронтир · H 1.58
5.0
из 10
смотреть не обязательно — забрать выжимку и пункты
оценка машинная и частично зависит от длины ролика — спорите, открывайте оригинал

Автоматизация PDF-сборки через MkDocs и Mermaid

PDF Export

Автоматизация сборки PDF-документации через MkDocs и mkdocs-to-pdf с офлайн-рендерингом Mermaid.

Автоматизация сборки PDF-документации через MkDocs и mkdocs-to-pdf с офлайн-рендерингом Mermaid.

что из этого моё

Можно применить как референс для автоматизации сборки документации проекта: настроить аналогичный пайплайн для генерации PDF-версии сайта или руководств. Но для оркестрации моделей и агентов прямой пользы нет.

Что забрать
отметь, что берёшь в работу → или отбрось как не своёмоё →
создать отдельную конфигурацию MkDocs для PDF, наследуемую от основной
добавить make-команду для сборки PDF с проверкой системных зависимостей
установить Node.js, Mermaid CLI и chrome-headless-shell для офлайн-рендеринга Mermaid
расшифровка ролика ↓

Title:

URL Source: https://raw.githubusercontent.com/explodinggradients/ragas/main/docs/community/pdf_export.md

Markdown Content: # PDF Export

## Purpose The PDF export feature builds the complete Ragas documentation as a single PDF file using MkDocs with the `mkdocs-to-pdf` plugin.

## Usage

The implementation uses two separate MkDocs configurations: - `mkdocs.yml` for standard HTML builds (no PDF dependencies required) - `mkdocs-pdf.yml` which inherits from the main config and adds the PDF plugin

Build PDF documentation: ```bash make build-docs-pdf ```

The generated PDF will be available at `site/pdf/document.pdf`.

Build HTML documentation only: ```bash make build-docs ```

The `make build-docs-pdf` command automatically checks for system dependencies before building.

## Mermaid diagrams in PDF (offline) Mermaid diagrams are rendered **offline** during the PDF build (converted to SVG before WeasyPrint runs). This requires a few additional dependencies besides WeasyPrint.

### Required tools - Node.js (needed to run Mermaid tooling). - Mermaid CLI (`mmdc`), installed via `@mermaid-js/mermaid-cli`. - A headless browser for Puppeteer (recommended: `chrome-headless-shell`).

## Current Limitations

**System Dependencies**: WeasyPrint requires OS-specific system libraries (Pango, Cairo) that must be installed separately. If you encounter issues, refer to the [WeasyPrint setup instructions](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html) and [troubleshooting guide](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting).

**ReadTheDocs**: PDF generation is not currently enabled in the ReadTheDocs build configuration.

дальше в дело
Собрать это в маршрут
все маршруты →
не хочешь разбираться сам
Сделаю это под задачу
форматы и цены →
ещё разборы