Module

postprocess.output_formats.llm_generator

Site-wide LLM text generator for Bengal SSG.

Generates a single llm-full.txt file containing all site content in an AI/LLM-friendly format for training, context, and analysis.

Classes

SiteLlmTxtGenerator
Generates site-wide llm-full.txt for AI discovery. Creates a single text file containing all site …
3

Generates site-wide llm-full.txt for AI discovery.

Creates a single text file containing all site content in a format optimized for AI/LLM consumption with clear page separators.

Methods 1

generate
Generate site-wide llm-full.txt.
1 Path
def generate(self, pages: list[Page]) -> Path

Generate site-wide llm-full.txt.

Parameters 1
pages list[Page]

List of pages to include

Returns

Path

Path to the generated llm-full.txt file

Internal Methods 2
__init__
Initialize the LLM text generator.
2 None
def __init__(self, site: Site, separator_width: int = 80) -> None

Initialize the LLM text generator.

Parameters 2
site Site

Site instance

separator_width int

Width of separator lines

_write_if_changed
Write content only if it differs from existing file.
2 None
def _write_if_changed(self, path: Path, content: str) -> None

Write content only if it differs from existing file.

Parameters 2
path Path
content str